Sheets only pulling in variable names - not data

I've followed the steps to create the widget. When the trigger to execute the javascript completes, it pulls in the column name fine, but the variable data doesn't get pulled in. It just shows the variable name.

So for example I create a variable called TextTest

The javascript code I add into the trigger is the following: SheetsSet('Text', 'TextTest');

The column name in the google sheet shows Text
But the data below the column name shows TextTest

Any thoughts welcome.

March 25, 2021, 12:27 pm

Click for thumbs down.0Click for thumbs up.0#1

Hello. Please make sure you followed step 1 of the instructions:

Open Storyline and create a blank text variable stencilsheetstoken.

March 25, 2021, 12:37 pm

Click for thumbs down.0Click for thumbs up.0#2

Hi John,

Yeah I did that. First step. It's in the variable list. It's a blank text variable

March 25, 2021, 12:42 pm

Click for thumbs down.0Click for thumbs up.0#3

Jack, if you want to upload your file with the triggers and post a link here, I'll take a look to see what's going on. Thank you!

March 25, 2021, 12:45 pm

Click for thumbs down.0Click for thumbs up.0#4

Hi John, sure that would be great.

Link to file - https://we.tl/t-YNQ2V5dFd0
Link to google sheet - https://docs.google.com/spreadsheets/d/16RRC_ID7if6ya3RyiU09XY8uWxZMm2_bCBr2wl1m1s8/edit?usp=sharing

Thanks,

Jack

March 25, 2021, 12:57 pm

Click for thumbs down.0Click for thumbs up.0#5

Ok, the widget works as expected. It's your trigger on the second slide that you should look at. Here are the instruction for using SheetsSet:

Replace column header with a header of your choice.
Replace value with the data you wish to save.

When you call SheetsSet('Text', 'TextTest'); you're saying "write the exact statement 'TextTest' in the column 'Text.'

If you wanted to send the value of the variable TextText, you would do something like this:

var player = GetPlayer();

SheetsSet('Text', player.GetVar('TextTest'));

 

March 25, 2021, 1:29 pm

Click for thumbs down.0Click for thumbs up.0#6

Hi John, thanks for your reply.

I wouldn't say the widget works as expected. It just sends the name of a variable, not the data from the variable itself.

I've pasted the code that you suggested, but it still doesn't work. I can see that you got it to work once from the google sheet. Would you be able to send the file back again so I can see what you've done to get it to work?

Thanks,

Jack

March 25, 2021, 3:47 pm

Click for thumbs down.0Click for thumbs up.0#7

Here you go: https://we.tl/t-5MRjpxZwDW

 

March 25, 2021, 5:42 pm

Click for thumbs down.0Click for thumbs up.1#8

Hi John - your advice above is invaluable & I've got my variable reporting to the right columns in the spreadsheet. However, each variable is making a new line when I need three variables in three columns in the same line. (First name, last name, email). What do I do with the code to make that happen?
Many thanks

Jay

March 26, 2021, 7:46 am

Click for thumbs down.0Click for thumbs up.0#9

That's great, thanks John. I've got that working.

I would suggest adding the additional step to pull the variable data through to the sheets into the instructions. That would then mirror the setup you provided in the demo.

Many thanks for your help with this.

Jack

March 26, 2021, 4:18 pm

Click for thumbs down.0Click for thumbs up.0#10

That's great, thanks John. I've got that working.

I would suggest adding the additional step to pull the variable data through to the sheets into the instructions. That would then mirror the setup you provided in the demo.

Many thanks for your help with this.

Jack

March 26, 2021, 4:19 pm

Click for thumbs down.0Click for thumbs up.0#11