Correct JavaScript code to save number variable value to Data Cloud
Hello,
What is the correct JavaScript code to save a Storyline number variable in the Data Cloud widget? All of my other triggers and fields are working, but they are all text variables. I have one variable that is the sum of three other variables, so it has to be a number variable.
I've tried many different variations and none of them are retrieving that variable, including:
var player = GetPlayer(); var entry = player.GetVar("MaskBehavior"); CloudSet('mask_behavior', entry);
Any advice would be much appreicated! Lori
Reply
Posted on 3/6/2022
Please type your reply.
@support
Lori, the code looks good. Can you post the link to the .story file? I'll take a look and see what's going on. You can remove all slides except for this one, I really don't need to see the entire project.
Reply
Posted on 3/6/2022
@lori
Hi John,
I would be happy to share the abbreviated .story file with you. Thanks for looking at it.
I forgot to add that I changed the variable to a text variable and instead am capturing four different ranges. Let me know if I should change that in the data cloud widget.
Thanks,
Lori
Reply
Posted on 3/6/2022
@support
Lori,
1 - Step 1 of the "How to use..." instructions is "Open Storyline and create a blank text variable stencilusertoken." I don't see this variable in your project.