Validation syntax

47 views
Skip to first unread message

Marc Zoss

unread,
Aug 3, 2015, 9:42:38 AM8/3/15
to Kobo Users
Hello

I want to validate a data entry field in the following situation. A previous question (Total_individual_Beneficiaries) indicates the total number of beneficiaries and in one question (integer) I want to know how many thereof are women (Number_Women). Thus, valid values would be between 0 and up to the total individual beneficiaries.
My following syntax ist not saved properly in the webinterface and thus only checks for negative values:

(. >= 0 and . < ${Total_individual_Beneficiaries})


Does it have anything to do with the group? Or, is the syntax just wrong?

Thanks and best regards
Marc

Tino Kreutzer

unread,
Aug 3, 2015, 4:18:27 PM8/3/15
to kobo-...@googlegroups.com
Hi Marc,

What you're writing sounds correct. What exactly do you mean with the syntax is "not saved properly in the webinterface"? I can only see a slight mistake in your formula: The second part should be less than or equal to (since all beneficiaries can be women). Here is what I did to reproduce your question:

Inline image 1

See the attachment to reproduce it. 

Best,
Tino 

--
You received this message because you are subscribed to the Google Groups "Kobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.
To post to this group, send email to kobo-...@googlegroups.com.
Visit this group at http://groups.google.com/group/kobo-users.
For more options, visit https://groups.google.com/d/optout.

Validation_check.xls

Marc Zoss

unread,
Aug 4, 2015, 5:25:38 AM8/4/15
to kobo-...@googlegroups.com
Dear Tino

thanks for your quick and clear feedback - greatly appreciated. I have done just as you have indicated (see screenshot attached) and then pressed "save and exit" which is duly accepted and no error is thrown. However, when reentering into the form it does not seem to have saved it properly (see attached screenshot "output"). When looking at the x-form, only the above zero part is saved (. >= 0).

I also put the constraint in the x-form and imported it but the behaviour is the same as above. Might this be a bug?

Thanks for your feedback and best regards
Marc







--
You received this message because you are subscribed to a topic in the Google Groups "Kobo Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kobo-users/QAd6botvddo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.
Visit this group at http://groups.google.com/group/kobo-users.
For more options, visit https://groups.google.com/d/optout.



--
----
Marc Zoss
Unter-Grunhof 20
CH-6032 Emmen
Switzerland
+41 76 505 64 53
output.PNG
Input.PNG

Tino Kreutzer

unread,
Aug 4, 2015, 1:12:23 PM8/4/15
to kobo-...@googlegroups.com
Hi Marc,

You're right - after reopening the form there is a bug with reading the ${variable} inside the manually set validation criterion. We'll fix it and deploy it to the servers ASAP.

Thanks for pointing this out. 

Best,
Tino
Reply all
Reply to author
Forward
0 new messages