Hello guys may I know the symbol used to represent the logical OR in UI Path.
Your simple example with the use of OR operator will be highly appreciated.
If you’re using default settings (with regards to underlying language, specifically), the operator Or can be used.
How and where do you want to use the logical operator OR .What activities to be exact @Ugyen_Penjor1
cheers
Happy learning
I just want to implement OR operator inside the condition If statement of UIpath
if you are using
VB.Net = use the word OR
C#.Net = ||
Hope it make sense and helpful to you.
cheers
Happy learning
yeah I am using VB.Net and OR operator works only on Boolean data type. I want to have OR operator between string data type.
The screen shot aare shown to you.
What you’re doing there is setting status to “Expired”. EDIT: On double-checking myself, that’s a remnant of my Java origins, VB.net doesn’t have a distinct comparison operator.
To check if a string already has a given value, use Status.Equals(“Expired”), this returns a boolean making it a simple matter of Status.Equals(“Expired”) Or Status.Equals(“Terminate”) to check both.
Thanks that worked
Thanks your solutions too worked.
Happy to help.
If you’re absolutely one hundred percent certain that your Status can only have a one-word value, what I tend to do is use Status.contains(“Terminate”) instead so that I don’t end up breaking my code by leaving a white-space in a config file, though Status.Trim.Equals() would be the correct way to achieve this (but I’m lazy so if I really want to sanitize my input I’ll do so separately).
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.