...
Let's say you want to set Weight3 to 10 only when Weight2==10, else Weight3=0;
For condicionals conditionals such as this, a form would be (/form/obs/weight2/value)==10?10:0
The "short if" works like this: condition?value_true:value_false.
Another example is all of this in the calculate property:
function calculateMyValues() {
if(/form/obs/weight2/value==6101 OR /form/obs/weight3/value==6101 OR /form/obs/weight4/value==6101) {
value = 4;
}
else if (/form/obs/weight2/value==6102 OR /form/obs/weight3/value==6102) {
value = 2;
}
} calculateMyValues();
If the field you are comparing with is a multiple select, then change 6101 to '6101^NAME^99DCT'
Description Template
A combination of any question answers and text which can be used to describe data collected in a form. This is mostly used for mobile devices which can have a list of data collected for the same form and use the property to enable the user to differentiate between the data items without having to first open and check each one by one. This is a property of only the form item and therefore you can give it a value only when the form is selected under the Forms Pane. If you do not know the syntax used, you can click the "Add Field" link and type the name of the question you would like to be part of the form description template.
...