user
@labeduasz
Use the sheet widget to capture variable from Storyline 360 into Google Sheet, nothing goes into Sheet
I have tried every suggestion I can find in the forum to make this work and nothing has. I am using Storyline 360 and followed the set up to connect to the Google Doc. I have created the blank text variable stencilsheetstoken and the trigger for the code given to run at the start of each slide. I am publishing using the Web option.

I have 2 custom variables "Name" and "Game" that have triggers to set their value to what is typed into a Text Entry Box.

The Trigger for the JavaScript is set to run when the user clicks Button1
Below are some of the various codes I have tried but none have worked:
1.
var player = GetPlayer();

SheetsSet('Name',player.GetVar('Name'));

SheetsSet('Game',player.GetVar('Game'));

2.
var player = GetPlayer();
SheetsSet('Name',player.GetVar('Name'));

3.
var player = GetPlayer();
var Name = player.GetVar("Name");
SheetsSet(‘Name’, player.GetVar(‘Name’));
var Game = player.GetVar("Game");
SheetsSet(‘Game’, player.GetVar(‘Game’));

4.
var player = GetPlayer();
var Name = player.GetVar("Name");
var Game = player.GetVar("Game");
SheetsSet(‘Name’, player.GetVar(‘Name’));
SheetsSet(‘Game’, player.GetVar(‘Game’));

5.
SheetsSet('Name', 'Name');

6.
var player = GetPlayer();
SheetsSet('Name', 'Name');

I do not know Java and am going mad trying to figure out what I am doing wrong. Any help would be greatly appreciated!! Thank you :)
reply
Reply
user
@support
Here's a tutorial you can take to learn how to implement the Sheets widget: https://cluelabs.com/tutorials/09-google-sheets-course-data-export/export-storyline-to-google-sheets/index#/

Also note that there is no "code given to run at the start of each slide" – I'm not sure where you got that, it's certainly not in the How to Use instructions.

From the javascript synaxis point of view, options #1 and #2 you posted look fine. If everything else in the file is set up correctly, these should work.
reply
Reply