This is a really simple question but it isn't working well for me.
I have an order form with quantities and amounts.
I have a field called Quantity.0 and a field called Amount.0
I want whatever quantity is in the "quantity" field to calculate into the amount field.
However after creating simplified and custom, it keeps increasing my amount field as I go through my spreadsheet.
If someone wants to decrease their quantity on the form, I would like it to recalculate the amount off the new quantity.
Then at the bottom of my form, I have a total field which I want to calculate all the Amounts. I used the sum+ and reordered the fields but that isn't adding correctly.
Any help is requested.
It is not clear what the exact script is that you are using. It would be helpful to post the script and possibly link to a copy of the form you are using the script in. Be sure to include all the scripts in the form.
The script I current have in the amount boxes: event.value = ( this.getField("Amount.7").value * this.getField("Quantity.7").value )
The total field, I just used the Value is the sum+ of the following fields.
You can't use a field's own value in its calculation. That's circular logic.
You need to create another column for the price of each item.
Ok. The pricing varies so I will just remove calculations. The employees can calculate on their own.
I guess I don't understand what you're trying to achieve... Isn't Quantity and Amount the same thing?
No. I added a new column for Item amount. So that way the formula should work and calculate the quantity * the item amount = total amount.
Ah, I see. The amount is actually the price. Well, you need to define the price-per-item somewhere. You can't use the same column for both things.