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
BedrockMission!

Learn More

View all

Sign in to view all badges

0,1,2,NA Validation with FormCalc Script

Avatar

Avatar
Level 1
matthewb2858754
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
matthewb2858754
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
matthewb2858754
Level 1

29-06-2016

Hi All,

I am attempting to create a validation for a text field with options of 0,1,2 and NA.  I originally started with

if (Within($,0,2) or $ eq "NA")

then

$=$

else

xfa.host.messageBox("Please enter a number 0-2 or NA")

$=null

endif

However this doesn't account for other text responses.  (If i were to enter "f" into this field with this code, for example, it would accept it.  I'm thinking the f registers as 0 in FormCalc, and so doesn't trip the validation script).

Anyone have some ideas for how to get around this?  Would very much appreciate any advice/guidance!

Thanks,

Matt

Accepted Solutions (0)

Answers (0)