Forum Discussion

AndrewHoskins-e's avatar
AndrewHoskins-e
Community Member
16 hours ago

Importing Variables from another SL file

I have an unusual use case and hopefully someone can help me.  If you have a solution, please lay it out as plainly as possible to avoid misunderstandings (by me) and thanks in advance.

I would like to use Storyline blocks to allow a learner to enter their name at the beginning of a Rise course and throughout the course pull in the name(variable). 

As I do not think I can tell Rise to pick a specific slide in a storyline block to start, I assume that I need to have a way to pull in the "UserName" variable from one block into another block.  

I am certain that javascript is needed and have found some to help me, but it is not working.  

Can anyone think of a way/provide the javascript and instructions needed to do this?

thank you!

  • Here are some sample Storyline projects, one where the user types in their name and the javascript that's executed saves the name, and one where the name gets displayed. I'm by no means a javascript expert and found these instructions from another helpful user here in ELH but these two projects worked for me! 

    The JS1 story is where the user types in their name. JS2 is the Storyline block Rise uses to retrieve it from local storage.