I'm trying to do a simple minus calculation in Laserfiche Forms
All i want to is "End K's" minus "Start K's and have the total in "Distance Total"
I've tried every combination i can think of, but all i get is this :
Can someone help please
I'm trying to do a simple minus calculation in Laserfiche Forms
All i want to is "End K's" minus "Start K's and have the total in "Distance Total"
I've tried every combination i can think of, but all i get is this :
Can someone help please
As your fields are inside table, use following to do calculation for each row.
=SUB(INDEX(Table.End_K_s_1,ROW()),INDEX(Table.Start_K_s_1,ROW()))
For future reference:
SUM(field1,field2) for Addition
SUB(field1,field2) for Substraction
PRODUCT(field1,field2) for Multiplication
DIV(field1,field2) for division
to Xiuhong's point, you need to use the INDEX function as well when identifying fields in aTable.
Try:
=SUM(Distance.End_k_s_1,-Distance.Start_k_s_1)
Thank you for all your suggestions, i still cant make any of them work though.
Hi Ian
Check your Field Variables and Table Variable name, unless you have created duplicates, they would be Start_K_s and End_K_s (no _1 on the end)
Also, versions of Forms previous to 10.1 did not support all of the Calculation Functions.
=SUB(INDEX(Distance.End_K_s,ROW()),INDEX(Distance.Start_K_s,ROW()))
Yep that worked, thanks Steve, i am using latest version of forms.
it seems that if you paste the formula in it doesn't work (i had the variables names correct) but building it directly in the form does.
thank you for your assistance