Saving Calculated Numeric Variables to an LMS

I've followed this post: however it will only allow for setting a Trigger equal to a Text variable. I've tried similar steps utilizing a How Many question slide, and have not been able to make that work for a Number variable. Essentially what I've built is a calculator and I can show all the manual entry and calculated numbers on the Results slide, but I also need to send the calculated numbers to the LMS. Has anyone been able to do this? Or are there any suggestions or ways to change a Number variable to a Text variable after the calculation is done?

6 Replies
Janet Wright

Hi Phil, I have tried editing the Variable and changing it to Number vs. Text - but that creates a new Variable. So if I create the blank short answer question, it creates a variable TextEntry1, if I edit that and change it to type Number, it creates a new variable Variable1. Assigning my Desk2 variable to Variable1 is accepted, but when I complete the course - the Answer column appears blank.

I've tried to attach my .story file here for you to see.

Essentially - the user enters:

Seat Pan Height: %SeatPan%

Seated Elbow Height: %Elbow%

Initial Desk Height: %Initial%

Based on the above - the following are calculated:

Desired Desk Height Range: %Desk2% to %Desk1%

Desk Height Adjustments: %Adjust1% to %Adjust2%

Thought I can have all the numbers display on the Results slide, I'm currently only getting the first three to show up in the Results Report to send to the LMS.

Janet Wright

After many days/hours and combinations, I think I've been able to reason out the Javascript Trigger I needed to execute in my case, thanks to some replies I've seen by Scott Flowers.

This seems to be working:

var player=GetPlayer();

var myDesk2=player.GetVar("Desk2");


Finally on to the next phase of getting the question level reporting from our new LMS...

Justin Lovett

I have been trying to send a Downloaded QRG, 1 = Yes, 0 = No variable to the LMS and it worked for a small while using QUIZ Slides but then when I tried Survey slide approach it no longer works. I don't want to have the quiz slide embedded into the course as it's a bit burdensome.


I will try the JavaScript.