Converting a number variable to a text variable
Feb 22, 2018
Hi Everyone,
I'm creating an on-boarding module where learners have to select their department from a visual organizer. The buttons assign a value to a number variable. This is then used to direct learners to specialised scenes that cover information from the perspective of their department. This is done through adding a trigger that says jump to scene X when user clicks button 1 if department variable is X / jump to scene Y when user clicks button 1 if department variable is Y.
However, I want to have some responsive text that uses the name of the department they selected. So what I am trying to do is this:
click button -> assign value to number variable -> insert text into responsive speech bubble
in other words
click IT button -> assign "6" to department variable -> insert "IT" into responsive text.
The reason I have not used a text variable is that I want to remove the chance that the learner will enter a typo. If a typo occurs then my trigger to jump to a scene will break and the learner will be stuck.
Does anyone have any suggestions?
7 Replies
One way to approach this is to use two separate variables.
Variable: DepartmentName as text
When user clicks IT button set department variable to 6, set departmentName to IT.
In the dynamic fields you can use %departmentName% to display the variable for the text of the department.
Have a look at the attached and see if that's what you wanted.
Hi Michael,
Sadly, I'm on SL3 and can't open the story file. Can it be saved to an earlier version?
Hi Steve,
Thanks for the idea. I'm completely new to working with variables, so I'm struggling with setting departmentName to IT. Is there a resource I can look at that would explain how to set this part up?
Hi Steve,
I figured it out. Thank you so much for your help!
Try this
The trigger setup looks like this:
This discussion is closed. You can start a new discussion or contact Articulate Support.