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

OR syntax not working

Avatar

09-10-2008

At least one of the boxes must be checked in order to pass the edit check but I can't get it to work properly!



If I check at least one of the boxes, the message still appears as if NEITHER box is checked. So it doesn't matter whether I check a box or not the message appears!



The syntax is on a Edit Button that also check for other things which all works. This is the only one that I can't get to work properly!



if ((form1.subPage3.subApply25.ckbQuest26dol.rawValue == 0) || (form1.subPage3.subApply25.ckbQuest26call.rawValue == 0)) {

xfa.host.messageBox("At lease one is required.", "Warning", "1")

exit;

}



Please help and thanks

Replies

Avatar

Avatar
Boost 5
Level 7
gkaiseril
Level 7

Likes

13 likes

Total Posts

456 posts

Correct Reply

2 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 7
gkaiseril
Level 7

Likes

13 likes

Total Posts

456 posts

Correct Reply

2 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile
gkaiseril
Level 7

09-10-2008

The syntax for the logical "OR" operator in LiveCycle Designer is "or". An example from LiveCycle Designer's "Scripting" reference that uses the "or" operator:



Expression: __ | Equivalent to: ____ | Returns:

0 and 1 or 2 > 1 | (0 and 1) or (2 >1) | 1 (true)

Avatar

Avatar
Level 5
_SekharN_
Level 5

Likes

0 likes

Total Posts

246 posts

Correct Reply

0 solutions
View profile

Avatar
Level 5
_SekharN_
Level 5

Likes

0 likes

Total Posts

246 posts

Correct Reply

0 solutions
View profile
_SekharN_
Level 5

10-10-2008

Hi Patricia,

With your description I guess you need to use "And" operatior in place of "Or" operator........



if ((form1.subPage3.subApply25.ckbQuest26dol.rawValue == 0) && (form1.subPage3.subApply25.ckbQuest26call.rawValue == 0)) {

xfa.host.messageBox("At lease one is required.", "Warning", "1")

exit;

}



Good Luck,

Sekhar

Avatar

14-10-2008

Hi Sekhar,



Your are right..I should use AND instead or OR. I don't know why I was trying to use OR instead of AND...guess one of those days **lol**



I used another way suggested by the Acrobat User Community Forums



http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=37420#p37420



I love these forums...they are so HELPFUL and a great learning tool!



Thanks for your help!