Constraint not working

Please I need assistance.
I am very conversant with building forms using xls. I have uploaded an xls form to Kobo and the constraint is not working but it works fine in ODK.

The constraint is like this .<=${comm_duty} where comm_duty is the name is xls form.
What am trying to do is, suppose question 1 ask the number of training organised? and question 2 is the number of training attended? I want to limit responses for question 2 to any number less than or equal to the number inputted for question 1. I hope my question is clear.

Secondly, I would be glad if you could share light on things that work in ODK but does not work in Kobo or point me to discussions that are related to this. This would be very helpful as I am new.


You should have something like this “${name}<=${comm_duty}”

Hi @RayRay,

Try this out. It should work for you.

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: (while trying to make a wrong entry)

Data entry screen as seen in Enketo: (while making a correct entry)

Reference xlsform:
Constraint Example.xlsx (9.6 KB)

Have a great day!

1 Like

I think it was fine, as a dot is used (referencing the current value). See also example from Kal_Lam below.