performing calculations in the table

T

Tony P

I am creating a form template with a table where user is
going to enter values into form number fields. I want to
calculate sum for each row. It is working if I use
Calculation field, but it displays 0 when there are not
entries. I am looking for solution which will display
values when sum is greater than 0 and will be blank for
sum equal 0. Is it possible to modify the formula in the
calculation field ? I was trying to create macro to be
executed on exit from the fields but I can not figure out
how to calculate the sum which will be entered into the
sum cell in the table. How I can solve my problem ???
Thanks for suggestion.

Tony
 
P

Peter Hewett

Hi Tony

You don't actually need any code for this the answer is in the formatting you
apply to your Formula field, the following will do what you want:

{ = 3+5 \# ",0;-,0;" }

The "3+5" is the formula, you need to replace this with your calculation. The
key bit is:
\# ",0;-,0;"

The part before the first semicolon is the postive number formatting, the
part between the two semicolons is the negative number format and the part
after the last semicolon is the zero number format, which in this case is
nothing!

For more details check out WOrds online help on "Numeric Picture (\#) field
switch"

HTH + Cheers - Peter
 
T

Tony P

Thank you for help. I have it working.

To update the fields I have added a short procedure which
is executed on exit from the data entry fields.

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top