What happens when you try to multiply the entries? If you're getting a strange value, it may be that the number is too large. If so, check out this article.
I also found a tutorial that explains how to add Numeric Entry Triggers. There's a lot of helpful information here, especially if you're new to setting up Triggers.
Also, from that tutorial, I found another piece of information that may help:
"Using a data entry field to trigger actions or perform calculations:
Because Storyline stores user-entered data in variables, you can use triggers and conditions to perform specific actions based upon the data that a user enters. Similarly, if you are using a numeric entry field, you can use triggers and conditions to make mathematical calculations based upon the value that a user enters. To learn how, check out this tutorial."
If you are doing the calculation on the same page, I would assign the value of the numeric entry to another vaariable and then multiply that.
It is an extra step but it will look more elegant. This is because when you multiply the variable the numeric entry field value will change as well. I think that can be confusing
Yes, that's what's happening - when I multiply the variable the numeric entry field value changes as well. Please explain "assigning the value of the numeric entry to another variable and then multiply that." Thanks!
Create a new numeric variable, create a trigger to adjust variable, ensure it is set to assignment, choose variable and then choose your numeric entry variable.
Then do your multiplication on the new variable, this way you have protected the numeric entry value
Thanks everyone. It works now except the value the user enters shows up real quick and disappears when the calculation is made by clicking Button 1. The correct answer is displayed but not before the NumericEntry value the users type in shows up and then disappears.
10 Replies
Hi Nicole,
I works fine for me... I set my trigger to "Change Variable" NumericEntry by Multiplying by Value (x) when control loses focus.
As soon as my number is typed and I click elsewhere or press tab, the entry is changed according to the multiplication.
I could also add a new Variable that would display the result.
Can you give more information about what you are experiencing?
Have a nice day!
Annie
Hi Nicole!
What happens when you try to multiply the entries? If you're getting a strange value, it may be that the number is too large. If so, check out this article.
I also found a tutorial that explains how to add Numeric Entry Triggers. There's a lot of helpful information here, especially if you're new to setting up Triggers.
Also, from that tutorial, I found another piece of information that may help:
"Using a data entry field to trigger actions or perform calculations:
Because Storyline stores user-entered data in variables, you can use triggers and conditions to perform specific actions based upon the data that a user enters. Similarly, if you are using a numeric entry field, you can use triggers and conditions to make mathematical calculations based upon the value that a user enters. To learn how, check out this tutorial."
I hope this information helps!
Have a great day,
Christine
I want to display it somewhere else. How do I set up the variable for that? Thanks!
Hi Nicole,
Could you be more specific? Where would you like to display it?
Thanks!
Christine
Ok, so you want to display the result elsewhere...
Create your variable (ex. : Total) then, if you want it to appear on another slide this is how I would set it.
Change Variable Total / Operator Multiply / Value (number wanted) / When Timeline starts / Object : the slide okn which it has to appear
Then, on your slide, just add your variable in a text box between percentage signs : %Total%
When previewing or publishing, it will be replaced by the value.
Hope it helps. Don't hesitate to post back if you need further information.
Annie
On the same page just in a different location. I'm making this so much more difficult than it should be so I've confused myself!
Basically it's like this:
NumericEntry that user types in X my set value which is 3 = the answer appears here
I was thinking of adding a calculator image to click on to reveal the answer.
Thanks!
If you are doing the calculation on the same page, I would assign the value of the numeric entry to another vaariable and then multiply that.
It is an extra step but it will look more elegant. This is because when you multiply the variable the numeric entry field value will change as well. I think that can be confusing
Yes, that's what's happening - when I multiply the variable the numeric entry field value changes as well. Please explain "assigning the value of the numeric entry to another variable and then multiply that." Thanks!
Create a new numeric variable, create a trigger to adjust variable, ensure it is set to assignment, choose variable and then choose your numeric entry variable.
Then do your multiplication on the new variable, this way you have protected the numeric entry value
Thanks everyone. It works now except the value the user enters shows up real quick and disappears when the calculation is made by clicking Button 1. The correct answer is displayed but not before the NumericEntry value the users type in shows up and then disappears.
This discussion is closed. You can start a new discussion or contact Articulate Support.