Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

sum help. Multiply cell b + c + d * 200000 / a

Avatar

Level 3

This formula is driving me crazy. Its a 3 step process. For one cell.

I need to add cell  b + c + d


Then take that number and times by 200,000


then take that number and divide by a

Does anyone have an idea?

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi,

Following radzmar instruction above to change the code to be

I have made the modifications and uploaded the file here https://acrobat.com/#d=gv3yzm73ZD-8gb-hPOlVbQ

Can you try that document and see if it works for you, this works for me, when

a != 0

b,c,d,e can be 0

Hope this helps

Malcolm

View solution in original post

0 Replies

Avatar

Level 3

if a number is already present in A i dont get an error..

i get this error testing in preview in live cycle...

Is there a way to prevent this??

Avatar

Level 10

This error appears, because one of your values is 0.

A division with 0 returns always 0 and the script fails.

So, to avoid the error, you can wrap you formula into an if expression.

Avatar

Level 3

now im getting this error.. We are getting so close to fixing this, i can feel it

error1.png

Code Behind
ss1.png

Avatar

Level 3

on a side note.. After i hit ok, the calculations work and act right.. I just get this screen when i try to open the form

Avatar

Level 10

Is any value null, 0 or negative by default in your form you use for the formula?

Avatar

Level 3

Its just a numeric field.. Nothing is in the field for value..

Avatar

Level 3

would it help to upload the live form?? How do I upload the form?

Avatar

Level 10

You can use Acrobat.com or any other file hoster to share your form.

Avatar

Level 10

Ok,

that was what I'm asking for.

If any of the values (a1 to e1) is null (empty) the script fails.

So, you need a more specific expression for you formula.

In TIR1 add:

and in LTA1 add:

Avatar

Level 3

the errors are gone but now the form is not calculating...... ugh.... this is driving me crazy.. Why??


https://acrobat.com/#d=eOTZq0SBO8g1AxeGxEQF8A