conditional triggers

Nov 19, 2019

I have created a slide with 6 buttons. Each button has the state normal and selected.

The idea is the user can select the buttons that show actions they have already completed and not select the actions they are yet to do. They can also un-select the button if they change their mind.

The Buttons default to false when not selected or un-selected (blue) and true when selected (green) using the Toggle command.

After the user makes their choices click on the submit button bringing up the "recommendations layer".

On this layer I would like to list the actions they need to take based on the actions they have not taken. So, there should be an action for each 'false' button.

Ideally, I would like to somehow create a list of 3 next recommended actions with hyperlinks and in order of priority - in this case from the top down.

For example 

if button 1 is false 

show recommendation 1

if button 2 is false 

show recommendation 2

if button 3 is false 

show recommendation 3

and this works fine for the first 3 buttons, the trouble Im having is when for example button 1 = true & button 2= true, I then when recommendations 3, 4 & 5  to list, and so on for any combination

I believe i would need to use javaScript for this and I'm not sure where to start.

Instead I have created a list of all the recommended actions with 2 states - normal (greyed out) and recommended action (black).

I have created a trigger to show the recommended action when any of the buttons = false. Buttons 1,2 & 3 will always work with simple true or false trigger, but when for instance buttons 2 & 4 are false I need to get recommendations 1,3, & 5 to show as black (not 6 because I only want the top 3 recommendations) 

but I can't get it to work 

it needs to be 

show action 5 text as black if

button 5 is false and (button 1 or button 2 or button 3 or button 4 are true)

but it seems to work as

(button 5 is false and button 1 is true) or button 2 or button 3 or button 4 are true).

Is anyone able to help either writing some Javascript or setting the triggers?

Many thanks in advance

Cath

 

9 Replies
Randy Hill

So one thing I see right off the bat is that you can't use conditional statements like you are. mixing and and or statements. The best way to change that is to have it the same as all the others with just the if variable equals false. In a separate trigger before it in the list you can adjust the false variable to true if the other ones are false. So for example. Change Dom1stClearchoise5 to true is the others are true. That may not be exactly what you are trying to do but you get my drift. 

This discussion is closed. You can start a new discussion or contact Articulate Support.