How can I achieve the following OR statement inside an IF function?
SET NewVar TO $'''Option A'''
IF Contains(NewVar, $'''Option A OR Option B''', False) THEN
Display.ShowMessageDialog.ShowMessage Message: $'''Yes''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False
END
SWITCH NewVar
CASE = $'''Option A'''
# Some activity.
CASE = $'''Option B'''
# Some other activity.
DEFAULT
# Some alternate activity or none at all.
END
Please try the below code:
Code:
SET NewVar TO $'''Option A'''
IF (Contains(NewVar, 'Option A', False) OR Contains(NewVar, 'Option B', False)) = True THEN
Display.ShowMessageDialog.ShowMessage Message: $'''Yes''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False
END
Thanks,
Deenuji Loganathan 👩💻
Power Automate Desktop Community Champion 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀