Branching back and forth using Variables

Jun 07, 2021

Hey everyone,

 

I'm trying to see if it's possible to use variables to setup branching for a course I'm working on.

 

The idea is to avoid making duplicate copies of slides for 4-5 different roles. So...what it would look like is this:

  • Intro
  • Choose your role (Sales | IT | Customer Service | Legal)
  • Each group has a slide or two of their own (which I can setup and is working)
  • Then they all come back to a single slide with info applicable to each group. THEN, based on the role they selected previously they could use the Next button to branch to a slide applicable to their role. And repeat that process throughout the entire course.

I tried this using T/F variables that I setup, with a default to false that changes to true if they select a role on that second slide. So the other roles would, in theory, stay false since they didn't select them on that slide.

When I got to a point where I want to branch from a common slide out to individual slides based on role - the branching isn't working. I even adjusted the triggers to say that each variable would only work if a variable = true and the others = false (SO the trigger that says if they were a sales person they would go to the next sales slide if the sales variable = True and the others were false). And it didn't work.


I tried this a number variable too and set the default to 0 and changed the variable to 1 for a specific variable when they selected it on that second slide - but that still didn't work.

Not sure if you're only allowed one variable to jump slides (using the next button or any single button) or if there's something else I'm missing in the settings. I don't think it's an issue with previewing the entire project because I published it to review 360 and it didn't work.

Any ideas? 

Thanks

John

8 Replies
Maria Costa-Stienstra

Hi, John, and welcome to E-Learning Heroes! ✨

Thank you for sharing those details!  If you can share your .story file, I'm happy to take a look and help you troubleshoot.

In the meantime, I'm attaching an example similar to what you described but using characters instead of roles.

On the first slide, the user picks the character, which sets the value of a text variable (but you can also use a number variable here). The second slide has a button that will take the user to three different slides, depending on their chosen character.

Windows 10 (1) 2021-06-07 at 4.32.19 PM

You can use the same triggers to branch your scenario throughout the project, using the variable's value.

Let me know if this works! 

Joseph Francis

I've done something similar, for 3 vertical markets (Education, Healthcare, Human Services). At the beginning, a variable (txtCourseTrack) is set and the course goes merrily along until it encounters a slide which has been "split" for the 3 verticals. On that slide, there are 3 layers (Education, Healthcare, Human Services) corresponding to the 3 markets, with 3 triggers on the Base Layer:

Show layer Education
When the timeline starts on this slide
if txtCourseTrack = value ED
Show layer Healthcare
When the timeline starts on this slide
if txtCourseTrack = value HC
Show layer Human Services
When the timeline starts on this slide
if txtCourseTrack = value HS

This works in my situation because the 3 tracks are otherwise parallel, with market-specific visuals, video, and/or text. It may or may not work in your particular situation. 

 

John Luczkowski

@Joseph - thanks for the idea - I will be keeping that in mind for future courses. That solution may not work for this particular course. We're in rapid development, building the plane as we're flying as the saying goes, and I do not know if on the slides were the tracks differ, that content will be similar enough to use layers. Could be....but I'm not 100% sure. However, I will be keeping that in mind as a potential solution.

John Luczkowski

Thanks Maria. I adjusted the course to try it this way, using a number variable. It worked for 2/3 tracks but for one - Sales - it gets stuck on "Everyone 1" slide. Would love to know what I'm doing wrong and would love to know how to do this with a True/False variable. I've attached the storyline file - it's just a mock up as we're still doing visual design & storyboarding right now.

Also - for my own edification and learning - it appears that you can have multiple triggers on the same action/object on a slide - in this case 3 (or more?) triggers that control what happens when the user/learner clicks the next/forward button. The variable controlling what happens based on logic. In my first mock up I setup 3 variables - Sales, Care, Tech, and set each one to True if they clicked on a certain path (using a button widget just as a test) on the intro slide. Does that logic of using variables to control action work if you setup more than one variable or is it the case that you need to setup one variable and use different values to control something like branching in this case?

Thanks

John

Walt Hamilton

In my first mock up I setup 3 variables - Sales, Care, Tech, and set each one to True if they clicked on a certain path (using a button widget just as a test) on the intro slide. Does that logic of using variables to control action work if you setup more than one variable or is it the case that you need to setup one variable and use different values to control something like branching in this case?

It can work either way, but there are two things you need to remember.

1) The actions are executed in the order the triggers appear in the trigger pane.

2) ALL the triggers that are associated with that action are executed every time that action happens.

So it is possible that all of your list is executed, but the last action is the one that you end up with.  The only exception to this is if there is a trigger in the list to jump to another slide. That action to jump ends the execution of the list.

So it depends on what you want. If you want an action (click, etc.) to cause two different resulting actions, you should use two different (perhaps T/F) variables. If you want only one out of a possible variety of resultant actions, you are probably better off using one variable with different values.

In the case of your example, there is some sort of corruption with the triggers on the Sales button. I discovered this by inserting a text box, going to the Insert tab, choosing reference, and selecting Branching.  When I previewed the menu slide only, that showed me that clicking on Sales caused an attempted jump, but not a change in the Branching variable.  Deleting both triggers for sales, and re-creating them solved the problem for me.

John Luczkowski
Walt Hamilton

In my first mock up I setup 3 variables - Sales, Care, Tech, and set each one to True if they clicked on a certain path (using a button widget just as a test) on the intro slide. Does that logic of using variables to control action work if you setup more than one variable or is it the case that you need to setup one variable and use different values to control something like branching in this case?

It can work either way, but there are two things you need to remember.

1) The actions are executed in the order the triggers appear in the trigger pane.

2) ALL the triggers that are associated with that action are executed every time that action happens.

So it is possible that all of your list is executed, but the last action is the one that you end up with.  The only exception to this is if there is a trigger in the list to jump to another slide. That action to jump ends the execution of the list.

So it depends on what you want. If you want an action (click, etc.) to cause two different resulting actions, you should use two different (perhaps T/F) variables. If you want only one out of a possible variety of resultant actions, you are probably better off using one variable with different values.

In the case of your example, there is some sort of corruption with the triggers on the Sales button. I discovered this by inserting a text box, going to the Insert tab, choosing reference, and selecting Branching.  When I previewed the menu slide only, that showed me that clicking on Sales caused an attempted jump, but not a change in the Branching variable.  Deleting both triggers for sales, and re-creating them solved the problem for me.

Walt - thanks for the input!!! SO...let me ask....in my example then what's the best course of action in your mind....considering that there may be a number of slides in the course where people need to go from a common slide to a slide where each track has a different slide - which option works best? Should I setup a single variable that changes values based on their role selection at the beginning or should I setup three separate variables, and branch using those variables.

Joseph Francis

In my case, I looked at it using electrical switches. It was easier, simpler, and more certain, IMHO, to set the state of a single-pole triple-throw switch than it was to set the states of 3 single-pole single-throw switches. especially since two of them MUST be off at any given time. If more than one SPST is inadvertently left ON, then the circuit is at risk.

Walt Hamilton

John,

I would, like Joseph, use a single variable, but with this caveat: make the learner click to choose their role, then use triggers to set the value of the variable. If you allow them to type in the value, you risk having a lot of variation in the variable.

Joseph,

You can make your SPST switches into a button group, which prevents more than one of them being ON at any given time.