14 Replies
Matthew Bibby

Yes Mark, absolutely. There is no need to use the results screen at all when implementing this.

You will need to alter part of the code used by the second trigger to have it work with your variables.

In the example shared, Steve is capturing the value of Slider1 (a Storyline variable) and TextEntry (another Storyline variable).


var vRate=player.GetVar("Slider1");
var vSuggestion=player.GetVar("TextEntry");

These two variables (Slider1 and TextEntry) need to exist in Storyline for this to work. 

If I was you, I'd build a sample using the example shared as that will give you a bit of an idea how it works. 

Then you'll need to rewrite the below code for each of the variables you want to capture and add it to the appropriate place in the second trigger, so for example:

var name=player.GetVar("StudentName"); 

Would take the value of StudentName (a Storyline variable) and pass it to a JavaScript variable called 'name'.

Then you'll need to change this section:

data: {"entry.156531987" :vRate,"entry.1547132205":vSuggestion}, 

This is used to copy the value of the JavaScript variable  to the appropriate column in the spreadsheet. The document that Steve wrote (linked in my first post above) shows how to find the correct 'entry.#########' for each column. 

So if we go back to our StudentName example, you'd need something like this:

data: {"entry.123456789":name}, 

Hopefully this is making a bit of sense and I haven't confused you too much! Let me know if you get stuck.

Lesley Condon

Hi Matt, Its been 3 years since this post was created, is it still the same requirements? I am just trying to export students names which they have to enter into a text field, and put them into a google sheet. I haven't managed to get it to work yet so searching all the forums to see whats out there. Thanks