Forum Discussion

AdrianaViveros's avatar
AdrianaViveros
Community Member
3 years ago

Create variables for a budget tool

Hi There,

I'm trying to create a variable slide in SL360 that shows the following example: 

The user enters a $( random amount) and calculation/variable automatically multiples by 50%, 30%, and 20%.

I'm trying to show a budget calculator that displays 3 separate calculations. 

Can someone lead me in the right direction?

Thank you in advance. 

Adriana 
  • Using Numbers and Variables in Storyline you can calculate almost anything. Only limitation is that SL rounds Numbers. If your calculation gets complex its better to use Javascript. Storyline rounds Numbers to 2 digits.
  • It's easier to do it with Javascript, but if that's not something you like to use, here's a workaround (example attached)

    1. Add a numeric entry field
    2. Create 3 additional variables, one for each percentage
    3. Set all 3 variables to match the user's entry and to open up a new layer
    4. Create a trigger to set new values for each of the three variables when the timeline on the new slide reaches 0.1
    5. Staying on the new slide, add a box over the variables, which disappears quickly. Hide the layer once the box over the new variables has disappeared. Set this layer to always reset to initial state.

    Other solutions exist - you could use something like this to avoid fussing around with layers: Setting Variables to Perform a Calculation in Articulate Storyline - E-Learning Heroes
  • Thank you Math and Matthew!!! These tips and steps helped so much. I appreciate your help.