Forum Discussion
Trigger to set short answer doesn't work
Hi
I was trying to make use of the advice presented in this guide https://articulate.com/support/article/Storyline-360-How-to-Send-the-Value-of-a-Variable-to-an-LMS
Specifically the part about using Survey Questions. In short I want to track a variable relating to whether users interact with certain elements.
I have created a test course with a simple button. Clicking the button sets the variable ButtonClicked to "Clicked".
Then the user will reach a short answer survey question, where I have followed the steps in the guide above to set the text entry to the aforementioned variable, and then submit it.
There are two relevant scripts for this (see attached screenshot):
1. Set TextEntry to variable ButtonClicked when the timeline starts on this slide
2. Submit Short Answer 1 when the timeline starts on this slide
This is exactly as described in the guide.
However, it simply doesn't work. The TextEntry variable ends up blank.
To keep track while testing I have added text that refers to the ButtonClicked and TextEntry variables to see if they are registered completely. The ButtonClicked works well, but the TextEntry ends up blank every time. I have attached screenshots showing the setup and how it works (or rather doesn't) in practice.
You can also see the entire test here: https://360.articulate.com/review/content/75698d0e-fe84-472b-9b14-9722aabd4e00/review
Never mind the placeholder text and questions, I used our usual template for creating courses as a starting point.
- MariaCSStaff
Hi, Tue.
Thank you for sharing the screenshots!
Without looking at your .story file, my initial suggestion would be to disable or delete the trigger that sets the TextEntry to the typed value:
If that doesn't work, would you be comfortable sharing your .story file either here or through a support case so we can take a deeper look?
- AndersBrydeThorCommunity Member
I tried disabling that trigger (it can't be deleted). It still doesn't work. I have attached the .story file here. Feel free to have a look, and see if you can figure it out.
- MariaCSStaff
Hi, Tue.
Thank you for sharing the .story file!
I noticed that when you change the trigger from "when the user clicks submit" to "when the timeline starts", Storyline still sees it as a player trigger:
If you disable that trigger and create a new one, it should work as expected:
Preview:
I'm attaching a copy of your edited file here.
Let me know if this works!
- AndersBrydeThorCommunity Member
Thank you for the assistance. That does indeed work. My only concern is that the Short Answer slide that registers the variable is visible to the user for a split second, including the name of the variable that's being entered. I'm thinking I can work around that by overlaying the question with some kind of loading screen of my own design, but that can get a little disruptive to the user experience especially if we want to track multiple variables.
Do you know any way to avoid this? As far as I can tell, there's no way to run triggers in a slide if the user doesn't visit it, but perhaps you have some insight/ideas here?
- MariaCSStaff
Hi, Tue.
I'm glad it worked!
As you pointed out, Storyline needs to go to that slide first so the triggers are executed, which is why you see the "flashing".
My workaround here would be to add a shape or design covering the slide, but I'm hopeful others in the community have other suggestions for you!