calculation with a validation..

Avatar

18-02-2009

I have a numeric field that does a calculation if (hasvalue) another field..which makes this numeric field show 0. I also have a validation that the input of this field must be 40-140. So when opening it shows 0 and the error message pops up. Is there anyway to have it not show 0 when the pdf opens so the validation script doesn't show an error?

Replies

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

20-02-2009

Hi,



I am guessing that because the script is in the caculation event and there is no data in the other field, it is showing a zero.



You could try an IF statement in the calculation event, which first checks if the other field is null. If it is then it would set the current field to null as well. If the other field hasValue then the calculation would be processed.



Good luck,



Niall

Avatar

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
Jono_Moore
Level 8

20-02-2009

Clicking "Allow Zero" for the Display pattern for the offending field will stop "0" from displaying.



I'm not sure whether or not this will help your calculation script.

Avatar

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
Jono_Moore
Level 8

24-02-2009

There should be - if you click on "Patterns" on the object palette the window that pops up has options on the right side for "Allow Empty" and "Allow Zero".



Unless you are using an older version? I'm in 8.2.

Avatar

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
Jono_Moore
Level 8

25-02-2009

Here's what goes in the Display Pattern when I hit Allow Zero: zero{}



Maybe give that a try in wherever the Display Pattern is in your version.