Create a Trigger to Show Layer if a Variety of Buttons are Selected

Apr 26, 2023

Hello! Is there a way to create a trigger to show a layer when a variety set by a number not specific buttons is selected? For example, I have an assessment with 10 True/False questions. I would like to have it that if they select 6-10 True checkboxes (doesn't matter the 6-10) and 1-4 False checkboxes (doesn't matter the 1-4) that a layer shows. Then vice versa, 6-10 False checkboxes and 1-4 True checkboxes and a different layer shows.

Thank you in advance!

2 Replies
Judy Nollet

Here's one way to do that: 

  • Create a number variable to track the number of True checkboxes selected.
  • Create a button for the user to click after they've made their selections. The button should have these triggers:
    • Sets the variable to 0 (so it'll always reset). 
    • For each T/F set, add 1 to variable if the associated True button is selected. 
    • Show the mostly-True layer if the variable >= 6, else show the mostly-False layer.

You can get more info about conditions and variables here: