How to reference a variable name in text throughout the course?
December 1, 2017 12:00 AM
Hi,
I am trying to make my courses more custom and I want to be able to be able to reference the participant's name throughout the course is text components. ie - "Good job answering that question John", etc.
I have set up a variable in the beginning of the course to collect the name. I then try to reference the variable within a text box but when tested it doesn't work.
Can someone lay out the order of operations I need to make this work. Please and thanks!
Discussion (2)
The first question is: How is the variable with the name set? Is it a text entry box or is it trying to pull it from the LMS using AICC_Student_Name? If you're grabbing it using this method, testing won't work unless it's published to an LMS.
Depending on how and when it's established, you may have to "trigger" it before it can be used elsewhere.
One trick might be to have a Change Contents in the place where the variable is first set using a button to submit the name. The button would then modify the variable, then use Change Contents - Text Block - "Thanks, VAR(your_var)."
Once it's set and referenced the first time, it should carry through the rest of the course. I had this happen with a variable I used that calculated a specific date referenced through out the course and had to use the Change Content to "trigger" it before it carried through the course.
If I have some time on Monday, I can try and whip something up. Otherwise, if you post a sample, at least one of us can take a look!
Jason,
The change content solution worked! You are a Lectora Wizard!!
Thanks for your insight!
-Alex
Discussions have been disabled for this post