Saving data with triggers in Articulate Storyline examples
Can you provide examples of saving data with triggers in Articulate Storyline? July 22, 2019, 6:18 pm |
Example 1. I set up a field called “status” and want to set it to either “pass” or “fail” depending on the situation. I will create a JavaScript trigger with the following code to set the status to “pass”: CloudSet('status', 'pass'); And the following JavaScript trigger to set the status to “fail”: CloudSet('status', 'fail'); I will use conditional triggers in Storyline to run the script: Example 2. I want to track whether the learner answered the question correctly. I set up a field called “quiz” and want to use values “correct” or “incorrect” depending on the answer provided. I will add this JavaScript trigger to execute when the timeline of the Correct layer starts: CloudSet('quiz', 'correct'); And this JavaScript trigger on the Incorrect layer: CloudSet('quiz', 'incorrect'); Example 3. I want to save the response entered by the learner in the module. I set up a field called “reflection” in the data table. In Storyline, I will add a text entry box for the learner to type their response: Then I will add the following trigger when the Submit button is clicked: var player = GetPlayer(); var entry = player.GetVar("TextEntry1"); CloudSet('reflection', entry);
July 22, 2019, 6:25 pm |