Re: Limit number of selections in Autocomplete validation
Will try to explain in sequence what I think will work
1) lets say user selects three values
2) trigger a rule on field change for that specific multiselect that contains a sql similar to this:
REGEXP_COUNT('string to search', '-') + 1
, REGEXP_COUNT('string to search', '-') + 1
eg 'string to search' should be the replaced by multiselect field token.
The dash should be replaced by the separator used by ppm multiselect fields
write the result to a hidden field (in this case values: 3 3, ppm needs two values for a field, one hidden and one visible for user.
3) create another rule that triggers on save that will check the value of the hidden field, generate a popup if the value is equal or more than 3 telling the user that they will need to have a maximum if two values in that specific field. Configure the rule to prevent save, check manual, advanced rules in demand manual or admin guide.
you might have to create more rules to capture all scenarios and the behavioir you wish