Field Calculation

Dear all,

These are all the steps I put to calculate the fields. All are unsuccessful.

  1. Create a calculate type and do the
    calculation ${bt_total}-${bt_unimproved}
  2. Put the formula directly into the fields and in the constraint .
    <=${tp_total}-${pour_flush}

Please see the attached file for more information. Could you please help me
how could I do this?

Thanks,
Chan Choth

GSF_Commune_DB.xls (33 KB)

Hi Chan,
I believe you can make your formulas work by adding spaces around your
${variables}. So, for example, the calculation "${bt_total} -
${bt_unimproved}" should work. In the future, I'll look into padding the
generated xpaths with spaces automatically so this kind of thing doesn't
happen.
Regards,
-Nathan

··· On Wednesday, February 20, 2013 12:05:12 AM UTC-8, Chan Choth wrote: > > Dear all, > > These are all the steps I put to calculate the fields. All are > unsuccessful. > > 1) Create a calculate type and do the > calculation ${bt_total}-${bt_unimproved} > 2) Put the formula directly into the fields and in the constraint . > <=${tp_total}-${pour_flush} > > Please see the attached file for more information. Could you please help > me how could I do this? > > Thanks, > Chan Choth >

Hi Nathan,

Thanks, it works now. I am looking forward for this future improvement that
you mentioned below.

Best regards,
Chan Choth

··· On Thursday, February 21, 2013 2:10:20 AM UTC+7, Nathan wrote: > > Hi Chan, > I believe you can make your formulas work by adding spaces around your > ${variables}. So, for example, the calculation "${bt_total} - > ${bt_unimproved}" should work. In the future, I'll look into padding the > generated xpaths with spaces automatically so this kind of thing doesn't > happen. > Regards, > -Nathan > > On Wednesday, February 20, 2013 12:05:12 AM UTC-8, Chan Choth wrote: >> >> Dear all, >> >> These are all the steps I put to calculate the fields. All are >> unsuccessful. >> >> 1) Create a calculate type and do the >> calculation ${bt_total}-${bt_unimproved} >> 2) Put the formula directly into the fields and in the constraint . >> <=${tp_total}-${pour_flush} >> >> Please see the attached file for more information. Could you please help >> me how could I do this? >> >> Thanks, >> Chan Choth >> >

Hi Chan,
I've updated the opendatakit.org XLSForm converter so adding spaces around
variables should no longer be necessary.
Regards,
-Nathan