Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is only for those fields whose values are a result of some computation. For instance if we had three fields: Weight1, Weight2, Weight3.
Where Weight3 = Weight2 - Weight1.
Then the calculation property would be only for the Weight3 field and would be: /form/obs/weight2/value - /form/obs/weight1/value
You can use the "add field" link on the right hand side which lets you select a form field and it inserts the xpath expression for each field.

Another example to multiple or divide is the following (/form/obs/peso_kg/value * 10000) / (/form/obs/talla/value * /form/obs/talla/value)

Use of conditionals

Let's say you want to set Weight3 to 10 only when Weight2==10, else Weight3=0;

...