About using logic

For eg : I have 5 male and 3 female in my family.
If I have a next question about : how many member in your family have bank account?
As if i give the input of male = 7 and female =6 .
It should give an input that please enter for male less than or equal to 5 and same goes for female: it should be less than 3
bank.xlsx (6.0 KB)

You could do the same as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: (when a wrong entry is made)

Data entry screen as seen in Enketo: (when a correct entry is made)

Reference xlsform:

Bank.xlsx (10.4 KB)

Thanks. Totally, appreciate able.

1 Like

i am getting an error /data/FM/Male

Maybe @martijnr would be in a best position to answer if this (referencing a value within a constraint_message) is still not available with Enketo version: 2.5.6 and is only available with latter version of the same? The latest seems to be Enketo version: 2.6.1.