Highlighted

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

Highlighted

Avatar

Avatar

gkaiseril

Avatar

gkaiseril

gkaiseril

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)
Highlighted

Avatar

Avatar

_SekharN_

Avatar

_SekharN_

_SekharN_

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
Highlighted

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!