Branching based on a variable

May 15, 2012

Is it possible to conduct hyperlink branching based on a previous 'decision' or access to a previous slide using 'variables'?

What I mean is I want to do a scenario where the learner must select from a number of 'tools' they will carry with them in an emergency situation. The will choose 3 tools from a list of 6-8. 

If they arrive at a 'slide' and are carrying the correct 'tool' to do the task, they can proceed on one branch, but not having the tool leads them to another branch. Their initial selection of tools and decisions they make within the scenario gives an outcome.

Any ideas on how to do this 'if <variable tool> = <tool unique number> then goto slide X else goto slide Y" type of branching...it might even have to be an array if there are more than one tool used!

21 Replies
Vispi Baria

Hi Gareth, I am just doing some basic branching on a project with variables I am working on, but I think you can apply the same logic with variables and triggers. To achieve the if/then/goto/else branching, you can setup triggers as follows:

trigger 1: jump to slide X (in the conditions just say IF variable tool = unique number)

trigger 2: jump to slide Y (in the conditions just say IF variable tool = unique number)

trigger 3: jump to slide Z (in the conditions just say IF variable tool = unique number)

Hope that is of some help, although someone can jump in if there is an easier/cleaner way...

Vispi.

Carlos Bohórquez

Hello there

I may have the same issue. I need an idea about how to create some variables.
I'm trying to create a module where people has to response some questions. If they don't have the correct answers they have to take the test back and answer it right. When I post on the results slide I play the tigger "failure" and it goes back to the slide I said, but I can't restart the test and it just let me see the slide as I saw it before. I can't give another answer.

I would appreciate any kind of help, I'm quitte new on this

Thank you!

Greg Davis

I have something similar. My users are divided into 2 categories; Employees and Leaders. Employees view slides 1-20 and then jump (from slide 20) to slide 30 to close the course. Leaders also view slides 1-20 but then move on to slides 21-30. Slide 1 has 2 radio buttons to select from (Employees or Leaders) and then click the submit button. At slide 20, I want the information collected in the variable on slide 1 to branch the user appropriately. I don't know how to do this. I couldn't find a screencast explaining this. Can you guys help me? 

Wendy Farmer

Hi Greg

create a T/F variable 'employees' default to false.

On slide 1 have this trigger:

  1. Adjust variable 'employees' to true when users clicks Employees button

On slide 20 add the following triggers to the Next button:

  1. Jump to slide 21 when user clicks Next button on condition that 'employees' is not = true
  2. Jump to slide 30 when user clicks Next button on condition that employees = true

Hope that helps

Christie Pollick

H, Greg -- I see that Wendy has been able to get you sorted out!  :)

As you mentioned that you would like to increase your knowledge of all-things related to Variables and Triggers, I thought I might add the following resources, as well:

Variables

Triggers

Hope that helps, and please let us know if you need anything further! :)

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