Highlighted

Field validation patterns - how sophisticated ? -

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

02-11-2008

While I was trying to figure out why the script for changing field appearances would work on the screen but not in the saved form (thanks to Paul for his help infiguring it out!), I ran across a web page which described how to use validation patterns that were more sophisticated than usual in that if the currency field was null, the usual .mandatory trap worked, but if a 0 was entered the field value was changed to "n/a" even though the field was a Numeric field. I unfortunately did not bookmark the page, but wondered (a) if anyone recollects a similar page or (b) has some ideas on how to achieve the same result?



Bill Bain

Atlanta

Replies

Highlighted

Avatar

Avatar

JohnBrinkman

Avatar

JohnBrinkman

JohnBrinkman

06-11-2008

Bill:

It might have been this blog entry:

http://blogs.adobe.com/formfeed/2008/10/numeric_constraint_no_zeros_2.html



The answer is to use a picture clause such as:

zero{'n/a'}|num{$zzzz9.99}



John
Highlighted

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

06-11-2008

Yup. That's it. Thanks. I bookmarked it since I have a use for this in the next revision of a form I'm working with.



Bill