How to use multiple fields as triggers on a calculation (a OR b etc)

(putting this in showcase as it's more of an example than a support issue, move as needed)

Surfacing some new (to me) info about multiple triggers so that searches / kapa can find the updated solution and help others

So ${trigger1} or ${trigger2} doesn't work, as previously discussed :up_arrow:, but trying this now gave a new and intriguing error:

On the 'survey' sheet, the 'trigger' value is invalid. Reference variable lists must have a comma between each variable.

Then trying ${trigger1} , ${trigger2} , the form validates and functions in Enketo, Web Forms & Collect. As does ${trigger1} , ${trigger2} , ${trigger3}

My assumption was that pyxform has been updated to parse multiple OR triggers into multiple setvalue actions, which was always possible previously but required some handcrafted XML. I also assume that an AND trigger is still not possible at this time.

The documentation would benefit from an update to indicate this useful new xlsxform ability. I had a look back through pyxform / docs issues and saw this was introduced in Sept 2025! But there was a silent failure in earlier pyxform versions that stopped any mention or doc updates, looks like it's all resolved via #780 now?

Example form to try multiple triggers:

multiple-trigger.xlsx (84.1 KB)

3 Likes

Thank you! We kept adding to the top of the todo list so this hasn't made its way back up. But you're absolutely right that it's now supported! :tada: