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

Question

Question

SUM INDEX on lookup

asked on November 4, 2016

Hi,

I am trying to use the SUM INDEX to get the total of some item columns to a total field in the same row.  The item column values are looked up from the database. Unfortunately I realize that the SUM calculation does not work on the looked up values. But once I key in the values manually, the SUM calculation works. Is there something am missing  here?

Mark

0 0

Answer

SELECTED ANSWER
replied on November 4, 2016

Hi Mark

I tried a bunch of things on your Table but ultimately was getting the same results as you. I have seen a couple times when making changes to Field Type (String/Number) once a Table has been created has produced some inconsistent result. I ended up creating a new table in your form, creating new fields and lookups and they worked right off the bat.

I'd suggest you delete your Results Table, and associated variables and build them again.

Attached is your form with my Tables and formulas included if you want to use those as an update to yours or for reference purposes.

 

0 0

Replies

replied on November 4, 2016

HI Mark

I have used Table Calculations even when there is a lookup.  When you say you are using the SUM(Index formula, is your complete Formula look like this?

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

0 0
replied on November 4, 2016

Hi Steve,

Yes my formula looks like that exactly. When the form starts there are no values in the total column. But if I reenter one of the other columns that are being summed up, the total fills up.

Mark

0 0
replied on November 4, 2016

I'm running Forms 10.1 Update 2. What is the Trigger for the lookup for your table?

I tried using a field both inside and outside the table to populate fields in the table and it worked. Care to share your form?

0 0
replied on November 4, 2016

Hi Steve,

My version is 

Laserfiche Forms Version 10.1.0.619

I have attached the form herein

I am trying to add from Cat 1 to Cat 7 and the total should be in the total column

You will have to rename the attached file to XML

Mark

 

0 0
replied on November 4, 2016 Show version history

Hi Mark, The lookup didn't make the import. Which field was the lookup on to build the table? Can you give me an example of this? and what a table looks like fille in?

0 0
replied on November 4, 2016

Hi,

Find attached the image of the form. Th fields in yellow were on the lookup. The total column should be the sum of cat.1 to cat.6 

Mark

Untitled.png
Untitled.png (45.02 KB)
0 0
SELECTED ANSWER
replied on November 4, 2016

Hi Mark

I tried a bunch of things on your Table but ultimately was getting the same results as you. I have seen a couple times when making changes to Field Type (String/Number) once a Table has been created has produced some inconsistent result. I ended up creating a new table in your form, creating new fields and lookups and they worked right off the bat.

I'd suggest you delete your Results Table, and associated variables and build them again.

Attached is your form with my Tables and formulas included if you want to use those as an update to yours or for reference purposes.

 

0 0
replied on November 5, 2016

Thanks Steve

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

Sign in to reply to this post.