Hi!
I have a repeatable group in an A12 model with a boolean field in it.
How can I check if all these fields are “true”?
I’ve tried AtLeastOneFieldValueIncludedInValueList and simular functions, but these don’t work for boolean fields.
This is for 2020.06
Update:
NumberOfValueInFields(False in repeatableGroup*/boolean)>0
this seems to work. It this the best way to do it?
I think there is no other way to check this.
Update:
You can also use the HAVING filter operator to write an alternative rule. This operator is available from the 2021.06 release version and you can read up on how to use it in the validation language documentation on geta12.com .
AtLeastOneGroupFilled(repeatGroup*/boolField Having [repeatGroup/boolField] == False)
Please note that if you’re creating a validation rule for a repeat, it may be better to model the rule in the repeat group so that it is evaluated for each new line in the repeat. For validation rules modelled at a level above the repeat (like your example) the error message will be shown in the first line of the repeat (displayed as orange warnings in the picture below). If the validation rule is in the repeatable group, the rule is often simpler and the error/warning message will be shown at the specific line(s) that are not valid. The validation rule inside the repeatable group was:
[boolField] == False
