I am using the if statement below on a button. What I would like to happen is if Name, Address, City, State, Zip and Member (fields) are empty you get the message Please complete all required fields or if the Member(field) (which is a yes=1, no=2) radio button equal 1 and eitehr Class, Room, Return or Local are empty you will get that same message. But if either of these conditions are met then it clicks the printbutton1.
if ((Name.rawValue == null) or
(Address.rawValue == null) or
(City.rawValue == null) or
(State.rawValue == null) or
(Zip.rawValue == null) or
(Member.rawValue == null) or
then
xfa.host.messageBox("Please complete all required fields to print.")
elseif
(Member.rawValue == 1) and
(Class.rawValue == null) or
(Room.rawValue == null) or
(Return.rawValue == null) or)
(Local.rawValue == null))
then
xfa.host.messageBox("Please complete all required fields to print.")
else
PrintButton1.execEvent("click")
endif
Any assistance would be greatly appreciated.
Thanks
Parre
Solved! Go to Solution.
Views
Replies
Total Likes
Try this (in formcalc):
if ((Name.isNull or Address.isNull or City.isNull or Zip.isNull or State.isNull or Member.isNull) or (Member == 1 and (Class.isNull or Room.isNull or Local.isNull))) then
xfa.host.messageBox("Please complete all required fields to print.")
else
PrintButton1.execEvent("click")
endif
Views
Replies
Total Likes
Try this (in formcalc):
if ((Name.isNull or Address.isNull or City.isNull or Zip.isNull or State.isNull or Member.isNull) or (Member == 1 and (Class.isNull or Room.isNull or Local.isNull))) then
xfa.host.messageBox("Please complete all required fields to print.")
else
PrintButton1.execEvent("click")
endif
Views
Replies
Total Likes
Thank you so much this worked great.
Views
Replies
Total Likes
Hi
I need to put two conditions in my PAGINATION TAB of my sub form .
suppose vendor is not equal to previous vendor OR
currency is not equal to previous curr . so it has to go and print in new page .
If i put one condition it is working fine but i want to check two condition how to write .
thanks
kiran
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies