Javascript - Update a status on google sheet on a single line

Nov 29, 2018

Hi,

I'm working on a project, and we want to have a tracking without lms, so i found that solution which work great :

https://s3-us-west-2.amazonaws.com/burnselearning.com/Posting+to+google+sheets/story_html5.html

But i'd love to have a status at first "in progress" and then on the last slide "finished".

The problem i have with the javascript here, is that it's create 2 lines on my google sheet, here is the source code :

//Add the web app url from your Google sheet, in addition to your variable names from Storyline.

var player = GetPlayer();

WEB_APP_URL = "ENTER URL HERE";

//Copy & paste Storyline variables
//Use a comma if you use multiple Storyline variables

storyline =
{
"ENTER_VARIABLE_NAME_HERE" : player.GetVar("ENTER_VARIABLE_NAME_HERE"),
"ENTER_VARIABLE_NAME_2_HERE" : player.GetVar("ENTER_VARIABLE_NAME_2_HERE"),
"ENTER_VARIABLE_NAME_3_HERE" : player.GetVar("ENTER_VARIABLE_NAME_3_HERE")
}

//Don't edit below this line, you're all set :)
$.ajax(
{
url: WEB_APP_URL,
type: "POST",
data: storyline,
success: function(data)
{
console.log(data);
},
error: function(err)
{
console.log('Error:', err);
}
});
return false;

Do you have an idea how could i have just one line with the evolving status ?

Thanks a lot !

Be the first to reply

This discussion is closed. You can start a new discussion or contact Articulate Support.