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

Question

Question

Forms: Subtracting values in a row

asked on September 22, 2016

I have a customer who is having issues with her calculations so I started a test table of my own. We are trying to subtract values across the same row and have them appear in another spot in that row. 

 

I am trying to subtract the value "ONE" from "TWO" and have it appear in value "THREE"

-does the calculation go in the advanced section of value "THREE?"

I have tried:

=SUB(INDEX(SUB_Function.TWO,SUB_Function.ONE)) - nothing happens

=SUB(SUB_Function.ONE,SUB_Function.TWO) - nothing happens

=SUM(SUB_Function.ONE)-SUM(SUB_Function.TWO) - nothing happens

 

Ideas?

0 0

Answer

SELECTED ANSWER
replied on September 22, 2016

You can use this formula in Column 3

=(INDEX(Table.Column_2,ROW())-INDEX(Table.Column_1,ROW()))

Just use the actual table and column variable names.

2 0
replied on September 22, 2016

This is what I tried but nothing happened. Do I need to put something for the rows?

=(INDEX(SUB_Function.TWO,ROW())-INDEX(SUB_Function.ONE,ROW()))

1 0
replied on September 22, 2016

Can you confirm that the columns in the table are "Number" type columns?

0 0
replied on September 22, 2016

this is my test table, the columns are actually ONE TWO and THREE

0 0
replied on September 22, 2016

Kelli,

I'm asking to make sure that the columns in your table are actually "Number" type columns. It may be good to also double check the variable names.

Here is how I have my table configured with things working.

Regards

0 0
replied on September 22, 2016

Oh I see now!! I'll check it! thanks!

0 0
replied on September 22, 2016

I must be missing something, because I copied it exactly and on the form when you fill it out underneath THREE it sys "this fields contains calculation error" 

 

Ill double check everything tho!

0 0
replied on September 22, 2016 Show version history

It says that after you enter in numbers into ONE and TWO and then click out of that field?

If you enter in a value into ONE or TWO, but not the other, then you might see that message. However, you can avoid that by specifying a default value for ONE and TWO in the table. Try giving them a default value of 0.

0 0
replied on September 22, 2016

I set the defaults to 0, the second I load the form, i see this...

 

0 0
replied on September 22, 2016

Please open a support case and provide a copy of the downloaded business process (as an xml file). It'd help us verify that everything has been configured correctly.

0 0

Replies

replied on September 22, 2016

Got it!!! Thank you!! I started a brand new form instead of adding a new table to my existing form and it worked so something in the form must have been conflicting with it! Thank you for your help!!!

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

Sign in to reply to this post.