Forum Discussion
Passing Variable Data Between Storyline Blocks in Rise (a guide)
Did you know that you can use the computer's local storage to pass data from one Storyline block to another one within the same Rise course? Well you can and all it takes is a few simple lines of JavaScript code.
This gives you all kinds of customization options for your Rise courses, including capturing and remembering the learners name and other selections they might make as shown here in this Rise example. What other ways might you use this?
https://360.articulate.com/review/content/b56569f8-4679-4c5c-a937-738eb98cc3fa/review
- JerryDonneyCommunity Member
Owen, if your still monitoring.. Does passing the variables from SL blocks work only on computers (local storage)? Since Rise360 is responsive, does this data sharing work on mobile devices? i.e. phone or tablet storage? Thanks
- OwenHoltSuper Hero
- SherriSagers1Community Member
Owen - You are a true hero! Thank you so much for sharing this. It's exactly what I was looking for!
- OwenHoltSuper Hero
My pleasure.
- OwenHoltSuper Hero
I haven't taken time to fully debug but one thing I noticed is the use of spaces in your JavaScript before the open parenthesis. This will break your code.
For example: var name = player.GetVar ("TextEntry") ;
Should be: var name = player.GetVar("TextEntry");
Try eliminating all of the extra spaces in your code and test it again.
- LindsayMaiselCommunity Member
Owen, thanks for sharing this is awesome. Didn't even know this was possible.
- BrianMcCannCommunity Member
Owen, thank you for sharing this. I've wanted to do something like this for a while. However, my lack of JavaScript knowledge has been a problem, and continues to be as I try to replicate this for one of my own projects.
I'm hoping someone can help me out. I tried to modify the code snippets Owen shared in a quick demo, but they're not working, which means I'm screwing something up. I'm not sure what I'm doing wrong though.
I've attached the Rise and both SL files. I wanted to design it so that in the first SL block someone puts their name in, clicks 1 of 2 guide characters, and then clicks submit. After they click the Continue button in Rise, the second SL block should show their name and the guide character they selected.
Another question related to the example: how does the print certificate feature work in SL block 3? I've looked at some other threads, but they don't seem to work in HTML5 output.
Any help is greatly appreciated. Thank you!
~Brian
- SarahHodgeFormer Staff
This is fascinating! Thanks for sharing Owen!
- OwenHoltSuper Hero
My pleasure Sarah.
- MathNotermans-9Community Member
Indeed great piece. One question pops out though. I tried using a 'completion' button after a Storyline block and it doesnot work in that case? What is your workaround to get that working?
- PhilMayorSuper Hero
@Owen, this is great I want to use to create a journal throughout a short course, my only issue is persistence of values between session which will not be possible.
@Math are you using the completion trigger in storyline?
- MathNotermans-9Community Member
Thx Phil. Your remark put me on the right track. Adding a 'Complete Trigger' in the Storyline fixed it... Great !!!!
- JoanneChenSuper Hero
This is awesome! Thanks for sharing, Owen. I am looking forward to using this.