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
- SherriSagers-caCommunity Member
In case anyone else needs what I did... I am using this solution to pass a score from a Storyline quiz to a Smartsheet form within Rise. Once in a while the Smartsheet form wouldn't have a score and that's because the Smartsheet form was on the same Rise page as the quiz, so when a learner would scroll down to the Smartsheet form, it would load and grab the nonexistent quiz score. As Owen explains above, I needed to add a continue button that doesn't become active until the learner finishes the quiz. Then when the learner clicks continue, it opens the Smartsheet form.
BTW - I had to put the Smartsheet form in a Storyline block in order to grab the score... I describe how to do that here:
- OwenHoltSuper Hero
That sounds like an awesome project Sherri!
- JoanneChenSuper Hero
This is awesome! Thanks for sharing, Owen. I am looking forward to using this.
- 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
Nope in Rise i want to use the 'Complete' element. When using it with basic Rise blocks it works ( more or less )
When using it with a Storyline block however it ignores it...
Do it need to add some trigger in Storyline to ensure it will be used for completion in Rise ?
Checking that now...
Math
- SarahHodgeFormer Staff
This is fascinating! Thanks for sharing Owen!
- OwenHoltSuper Hero
My pleasure Sarah.
- 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
- 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.
- OwenHoltSuper Hero
My pleasure.
- 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
- 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