Validation condition

Hi,
I am stuck at one of validation needed for check box question. The
question requires 3 options to be chosen out of A,B,C,D,E, F and option
’None’ . Present validation condition is :
count-selected(.) = 3 and not(selected(., “none”) and count-selected(.) >
1)

However this does not allow the user to only select none option as three
options need to be selected. Can any logic be suggested in case we have
above condition fulfilled or also if user chooses only ‘none’ , it is
validated .

Also recently this issue have also come up while deploying a version:

"Errors making a new version:
Validation Error: The selected function was provided the incorrect number
of arguments:1. It expected 2 arguments. in form
Build errors prevent you from building your application in the Release
Manager. For more information on build errors, please see Errors Building
an Application "

Hi Taniya,

I think the expression to describe what you are outlining could be as
simple as

. = “none” or (count-selected(.) = 3 and not(selected(., “none”)))

You’ll need at least one “or” option if you intend to allow the question to
proceed with fewer than 3 items selected.

-Clayton

··· On Fri, Mar 3, 2017 at 12:16 PM, Taniya wrote:

Hi,
I am stuck at one of validation needed for check box question. The
question requires 3 options to be chosen out of A,B,C,D,E, F and option
’None’ . Present validation condition is :
count-selected(.) = 3 and not(selected(., “none”) and count-selected(.) >
1)

However this does not allow the user to only select none option as three
options need to be selected. Can any logic be suggested in case we have
above condition fulfilled or also if user chooses only ‘none’ , it is
validated .


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