You are viewing limited content. For full access, please sign in.

Question

Question

Simple Minus Calculations in Laserfiche Forms

asked on December 13, 2016

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

0 0

Answer

SELECTED ANSWER
replied on December 14, 2016

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()))

1 0

Replies

replied on December 14, 2016 Show version history

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.

3 0
replied on December 13, 2016

Try:

=SUM(Distance.End_k_s_1,-Distance.Start_k_s_1)

 

0 0
replied on December 14, 2016

Thank you for all your suggestions, i still cant make any of them work though.

0 0
replied on December 15, 2016

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()))

1 0
replied on December 15, 2016

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

 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.