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

Question

Question

Form 10.2: Table Calculated Fields

asked on November 28, 2017

I read about LF Forms 10 having the ability to perform calculation; however, I'm in need of assistance.

I have a Cell Phone Reimbursement table with three columns (Date, Description, Amount). The Amount column is currency typed and will need to be calculated. The number of rows in the table will vary depending on the individual. I inserted a currency Cell Phone Reimbursement Amount field as the calculated field.

Can this be completed without using JavaScript? If not, what type JavaScript would I be looking to use?

Reimbur.JPG
Reimbur.JPG (49.18 KB)
1 0

Answer

SELECTED ANSWER
replied on November 28, 2017 Show version history

Yes, you can use functions, the only catch is that you need to include the INDEX function as well if you want to target individual rows.

 

So, the following sums all rows for both columns

SUM(table.column1,table.column2)

 

The following sums only the values for the current row (when used in a table field)

SUM(INDEX(table.column1,ROW()),INDEX(table.column2,ROW()))

5 0

Replies

replied on December 4, 2017

When saving a form with calculated fields, the fields are not updating or displaying the correct amount. Example, in the mileage table I have a total of 103 miles. 103 x .535 = $55.10; however, the calculated field continues to display $36.92. If I go in and delete or add a row, the correct amount is displayed, yet once the form is updated again, it redisplays the $36.92.

In the calculated Mileage (Number) field , I have =SUM(MILEAGE_REIMBURSEMENT.Mileage)
In the calculated Cell Phone (Currency) field, I have =SUM(CELL_PHONE.Amount)

In the calculated Total Reimbursement (Currency) field, I have =CellPhoneReimbAmount+MileageReimbAmount

SC1.JPG
SC1.JPG (59.8 KB)
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.