# Looking for some help with my calculator!

Hello, everyone!

Looking for some help with my calculator. How can I make this equation happen?

Calculation :

6 lb/ton (fixed number) ***** Current value of gain (price entered by user) **/** 100 = Value of additional gain per ton of silage. (number to appear in red rectangle).

I added Calculate button but not sure how to proceed with its trigger.

Any ideas?

Thanks!

Julie

## 7 Replies

I created Numeric Entry boxes for the Current Value of gain as well as Value of additional gain (blue and red boxes).

On my Calculate button, I added a Trigger... but couldn't find a way to multiply the 6lbs (fixed number) to the added Price the user will enter in the Current Value of gain, which is divided by 100...

Have a look at the attached and see if that's what you wanted.

Calculate_MH.storyOMG! Thanks, Micheal, that's fantastic!

I'm going through the Triggers to understand the logic.

Last question... Is it possible to show the results (ValueOfAddedGain) with decimals?

For example, if the total is $3.00 ... Currently, it shows up as 3

Depending on the entered current value, the ValueOfAddedGain will be shown with decimals, e.g. 74.07. If you need decimals like 1,200.45, that would require to format the calculated ValueOfAddedGain with Javascript.

Thanks, Michael!

Your help was greatly appreciated.

Hello,

I have the JavaScript to show the decimals. However, not sure where to attach it to. I tried the following and didn't work:

Created a trigger 'Execute JavaScript' when user clicks the Calculate Button.

All the help I can get is greatly appreciated !

Thanks,

Julie

2017-06-15_10-57-20.png