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

Question

Question

new javascript in forms - rows adding all together

asked on May 31, 2016

Hi There

I am using the new javascript in forms 10.1. When I use it in a table, I want to add the values in the rows together to get a total (last box in the row) but when new rows are added, it all adds up together, not independently per row like I want.

 

 

 

How can I use the javascript but not have the rows add up together?

 

Thank You

Kelli

 

0 0

Replies

replied on May 31, 2016

Hi Kelli,

 

Forms 10.1 supports same row calculation. If you are using Forms 10.1, a better way to do "sum" in each row would be using formula.

 

e.g.:

if you want to sum N1, N2 and N3 in each row in your table, you can put 

=SUM( INDEX(Table.N1,ROW()) , INDEX(Table.N2,ROW()) , INDEX(Table.N3,ROW()) )

in your "Sub-total" field

and it will work as expected.

You can check here for more changes/updates made in Forms 10.1

https://support.laserfiche.com/KB/1013758

Thank you.

0 0
replied on May 31, 2016

Hello Lifei,

 

   Is there a procedure for then summing the totals for each value in the Sub-total column for use in another part of the form?

 

Thanks,

Michael

0 0
replied on May 31, 2016

Hi Michael,

Yes you can do that using "sum" function provided by Forms.

E.g.: =SUM(Table.SubTotal)

this will sum the "sub-total" column in each row

 

and furthermore , you can do this "sum" conditionally using "SUMIFS"

E.g.:

this will sum "sub-total" only for rows with N2<20 and N3>20

2 0
replied on June 3, 2016

Lifei, thank you very much!

0 0
replied on August 4, 2016

Your answer worked great.  Thanks.  I would never have come up with the solution on my own.

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

Sign in to reply to this post.