...
Code Block |
---|
(function () { if(/form/obs/weight2/value == 6101 || (/form/obs/weight3/value == 6101 && /form/obs/weight4/value == 6101) ) { return 4; } else if (/form/obs/weight2/value == 6102 || /form/obs/weight3/value == 6102) { return 2; } } ) () |
...
For sum, set the calculation property to something like: /new_form1/question1 + /new_form1/question2
NOTE: There is a bug which requires you to have spaces on both sides of the equal signs. For instance, use: ...value == 6101 instead of ...value==6101
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.
...