Offer a "count" rule condition on multi-select fields.

I just ran into a scenario where a “count” condition would be useful for multi-select fields.
For example, when the field is changed, if 3 items are selected in the field (which items doesn’t matter), then take a specific action. This would be similar to “Number is” conditions for Number type fields (>, <, =, >=, !=, empty, etc.)

Hi @Adam-Involute, you could leverage a number field and a rule action to add a number 1 value for each ‘item’. Then you could have another rule that when number is equal to or greater than 3, then ‘do a specific action’.

1 Like

@Richard_Sather I don’t see how you ‘add a number 1 value for each item’. I can only see how to add a number or custom field value to a number field. That math doesn’t seem available. I’ve been looking for the same item.count capability. I could do it with several fields and a function field but it seems like overkill just to see if 3 items are selected.

Any advice would be very welcome! Thanks!

For us, we did the following brute-force workaround because our item list is short (only 4). It was a gnarly bunch of check-ifs / otherwise-ifs where each conditional check is a painfully specific check. For example, check if all of options 2 and 3 are checked, but none of options 1 and 4; if so, perform the 2-items-checked action. I think this approach is probably too cumbersome for multi-selects with more than 4 options, however.

Hi @John_Parkinson , welcome to the forum :waving_hand:

Have a look at these for some inspiration: