Forum Discussion
How to add two number variables together after a User input their own numbers in the number field.
I am trying to add two variable numbers together where they have already been populated to equal what a user input in the number field.
In the attached I can't seem to find a way to add the 2 numbers under the Divison 1 to equal the percentage (same formula as the Business Units).
I also then need to add them again under the Board & Executive heading.
Can anyone give me some tips?
Thank you.
- PhilMayor-b4ca0Community Member
You can create a variable and then add the two values to it using triggers
- CatherineSmi624Community Member
Thank you - that worked
- CatherineSmi624Community Member
Do you know how I would then divide the two variables that are already auto calculated from what the User input in the number field? Adding the numbers worked but I cannot work out how to divide the numbers.
- WaltHamiltonSuper Hero
The drop down where you found addition will also have division.
- CatherineSmi624Community Member
I tried that but it just comes up as 0.. I may be missing something I just can't pinpoint what excactly
- CatherineSmi624Community Member
for example, I need to get the percentage of the below highlighted by dividing the 140 / 1000. It works when I add but I cannot seem to find how to divide these numbers and then x 100 to get the percentage. the below numbers are number input fields the user will enter, the ones above are autopopulated by those numbers.
Hello Protecht Academy,
Happy to help!
After creating a variable which will store the correct answer, I added the following two triggers to calculate the answer for the equation under Division 1:
Then I added an onscreen variable reference for the variable that I created ("articulate_test").
This allowed the correct answer for the equation to appear after the learner clicks on calculate.
I've attached a copy of your edited project file so you can see all of the changes that I made to your slide.
Let me know if you need anything else!