# If formula

Hi all?

Can anyone help me on this.
I have a formula that sums up the choices selected using:

int(\${relev_fpage_1stcard}) + int(\${relev_fpage_2ndcard}) +
int(\${relev_fpage_3rdcard}) + int(\${relev_fpage_4thcard}) +
int(\${relev_fpage_5thcard}) + int(\${relev_fpage_6thcard}) +
int(\${relev_fpage_7thcard}) + int(\${relev_fpage_8thcard}) +
int(\${relev_fpage_9thcard}) + int(\${relev_fpage_10thcard})

The choice list is a single select with; Yes=1, No=0, N/A= -9. The above
formula works well if the choice only had Yes and No.

So I looked around and found:

if(\${relev_fpage_1stcard} > 0, int(\${relev_fpage_1stcard}, 0) +
if(\${relev_fpage_2ndcard} > 0, int(\${relev_fpage_2ndcard}, 0) +
if(\${relev_fpage_3rdcard} > 0, int(\${relev_fpage_3rdcard}, 0) +
if(\${relev_fpage_4thcard} > 0, int(\${relev_fpage_4thcard}, 0) +
if(\${relev_fpage_5thcard} > 0, int(\${relev_fpage_5thcard}, 0) +
if(\${relev_fpage_6thcard} > 0, int(\${relev_fpage_6thcard}, 0) +
if(\${relev_fpage_7thcard} > 0, int(\${relev_fpage_7thcard}, 0) +
if(\${relev_fpage_8thcard} > 0, int(\${relev_fpage_9thcard}, 0) +
if(\${relev_fpage_10thcard} > 0, int(\${relev_fpage_10thcard}, 0)

This is supposed to ignore -9 in the calculation. However it doesnt work.
On the tablet I get the following message;

Invalid caluculate for the bind attacged to
"/RDQATOOL_2016/relevance_fp_sum" : mismatched brackets or parenthesis in
expression,.....

Any assistance to this and my previous post will be highly appreciated.

Louis...

all of your int(...) expressions are missing the trailing ).

Should be int(\${...})

··· On Tue, Apr 26, 2016 at 9:33 PM, Louis Omoya wrote:

Hi all?

Can anyone help me on this.
I have a formula that sums up the choices selected using:

int(\${relev_fpage_1stcard}) + int(\${relev_fpage_2ndcard}) +
int(\${relev_fpage_3rdcard}) + int(\${relev_fpage_4thcard}) +
int(\${relev_fpage_5thcard}) + int(\${relev_fpage_6thcard}) +
int(\${relev_fpage_7thcard}) + int(\${relev_fpage_8thcard}) +
int(\${relev_fpage_9thcard}) + int(\${relev_fpage_10thcard})

The choice list is a single select with; Yes=1, No=0, N/A= -9. The above
formula works well if the choice only had Yes and No.

So I looked around and found:

if(\${relev_fpage_1stcard} > 0, int(\${relev_fpage_1stcard}, 0) +
if(\${relev_fpage_2ndcard} > 0, int(\${relev_fpage_2ndcard}, 0) +
if(\${relev_fpage_3rdcard} > 0, int(\${relev_fpage_3rdcard}, 0) +
if(\${relev_fpage_4thcard} > 0, int(\${relev_fpage_4thcard}, 0) +
if(\${relev_fpage_5thcard} > 0, int(\${relev_fpage_5thcard}, 0) +
if(\${relev_fpage_6thcard} > 0, int(\${relev_fpage_6thcard}, 0) +
if(\${relev_fpage_7thcard} > 0, int(\${relev_fpage_7thcard}, 0) +
if(\${relev_fpage_8thcard} > 0, int(\${relev_fpage_9thcard}, 0) +
if(\${relev_fpage_10thcard} > 0, int(\${relev_fpage_10thcard}, 0)

This is supposed to ignore -9 in the calculation. However it doesnt work.
On the tablet I get the following message;

Invalid caluculate for the bind attacged to
"/RDQATOOL_2016/relevance_fp_sum" : mismatched brackets or parenthesis in
expression,.....

Any assistance to this and my previous post will be highly appreciated.

Louis...

## --

You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thank you. I will rectify this

··· On 27 Apr 2016 22:13, "Mitch Sundt" wrote:

all of your int(...) expressions are missing the trailing ).

Should be int(\${...})

On Tue, Apr 26, 2016 at 9:33 PM, Louis Omoya louisomoya@gmail.com wrote:

Hi all?

Can anyone help me on this.
I have a formula that sums up the choices selected using:

int(\${relev_fpage_1stcard}) + int(\${relev_fpage_2ndcard}) +
int(\${relev_fpage_3rdcard}) + int(\${relev_fpage_4thcard}) +
int(\${relev_fpage_5thcard}) + int(\${relev_fpage_6thcard}) +
int(\${relev_fpage_7thcard}) + int(\${relev_fpage_8thcard}) +
int(\${relev_fpage_9thcard}) + int(\${relev_fpage_10thcard})

The choice list is a single select with; Yes=1, No=0, N/A= -9. The above
formula works well if the choice only had Yes and No.

So I looked around and found:

if(\${relev_fpage_1stcard} > 0, int(\${relev_fpage_1stcard}, 0) +
if(\${relev_fpage_2ndcard} > 0, int(\${relev_fpage_2ndcard}, 0) +
if(\${relev_fpage_3rdcard} > 0, int(\${relev_fpage_3rdcard}, 0) +
if(\${relev_fpage_4thcard} > 0, int(\${relev_fpage_4thcard}, 0) +
if(\${relev_fpage_5thcard} > 0, int(\${relev_fpage_5thcard}, 0) +
if(\${relev_fpage_6thcard} > 0, int(\${relev_fpage_6thcard}, 0) +
if(\${relev_fpage_7thcard} > 0, int(\${relev_fpage_7thcard}, 0) +
if(\${relev_fpage_8thcard} > 0, int(\${relev_fpage_9thcard}, 0) +
if(\${relev_fpage_10thcard} > 0, int(\${relev_fpage_10thcard}, 0)

This is supposed to ignore -9 in the calculation. However it doesnt work.
On the tablet I get the following message;

Invalid caluculate for the bind attacged to
"/RDQATOOL_2016/relevance_fp_sum" : mismatched brackets or parenthesis in
expression,.....

Any assistance to this and my previous post will be highly appreciated.

Louis...

## --

You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

## --

You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an