Steps To Use Articulate Storyline 360 Variables To Perform Percentage Calculation
In this blog let’s see the steps to use Articulate Storyline 360 Variables to do percentage calculation.
In this blog let’s see the steps to use Articulate Storyline 360 Variables to do percentage calculation.
Step 1: Insert all the Names and Entry boxes as required.
Step 2: Create variables for each entry.
Step 3: Keep them in between % symbol to show their calculated values.
Step 4: Write the following JavaScript on Submit button.
JavaScript:
var a = GetPlayer();
var b = a.GetVar(“months”) * a.GetVar(“thirtyfive”);
a.SetVar(“GPD”, b);
var c = a.GetVar(“months”) – a.GetVar(“GPD”);
a.SetVar(“CGS”, c);
var d = a.GetVar(“CGS”) / a.GetVar(“sales”) * a.GetVar(“twelve”);
a.SetVar(“ACGS”, d);
var e = a.GetVar(“ACGS”);
a.SetVar(“ACOGSLAST”, e);
var divide = a.GetVar(“ACOGSLAST”) / a.GetVar(“Invtamount”);
a.SetVar(“years”, divide);
Step 5: Gross profit % we have fixed it like 35% if you want to change it you can change by adding the value in thirty-five variable
Note: Whatever number you are keeping in Gross profit %, make sure to divide it and keep the value in the variable. For example, 50% means 50/100 = 0.5. Keep 0.5 as the value of “thirty-five” to get the correct value.
Step 6: publish and view the output.
Click here to view the demo.