These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Case Insensitive flag for Livecycle if statement

lmontee
Registered: Jul 21 2011
Posts: 9
Answered

I'm trying to find a way to have an if statement be case insensitive.
 
if (xfa.event.newText =="AF")
 
I would like to have the user input recognize AF,af,Af,aF
 
Is there a flag or option to do this? Could you include the syntax as I am a beginner as well?
Thanks
Larry

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
Accepted Answer
Try:

if (xfa.event.newText.toUpperCase() == "AF")
lmontee
Registered: Jul 21 2011
Posts: 9
Thanks very much George!
Worked perfectly!

Larry