Forum Discussion

TechRockED's avatar
TechRockED
Community Member
3 years ago

Formula calculation

Hi Everyone,

I need to perform a simple calculation in the storyline, which has the formula in it. On the first page, I have made the user to enter the inputs (x,y,z).

The Formula is (x/y)*z=P.

So, I need to perform the calculation and have to store the result value to the variable(Z).

I have attached the work file and articulate review link here for your reference.

Is this something that can be done in Storyline or does it require javascript? 

Any help is much appreciated!

 

Thank you,

Sudhakaran

  • Create four variables

    X

    Y

    Z

    P

    Add the following triggers in this order: (not sure what your listener would be, but could use on click)

    Adjust variable, assign value of X to P

    Adjust variable multiply P by Y

    Adjust variable

    Divide P by Z

    You should have your answer

    If you need to store in LMS then create a number question and assign the value and submit and report via a results slide,

     

    • PriyankaOjha-11's avatar
      PriyankaOjha-11
      Community Member

      Hi. I have a similar issue and cannot solve it. I have a number variable named 100CAD and I need the following calculation performed without a button to be shown: 100CAD*100. Any help will be appreciated. 

  • TechRockED's avatar
    TechRockED
    Community Member

    Thanks Phil for your quick response, It working well really appreciate but can you do one more favor?

    I need one more formula to be performed in the storyline which is as follows.

    User Input (a,b,c) and I have created the variables (E, F, G, H)

    To Find:

    E=(a/(b/c))*2

    and have to display

    F=E*2

    G=E*4

    H=E*6

    Thanks 

    Sudhakar