What symbol is used for the logical OR in uipath

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.

1 Like

If you’re using default settings (with regards to underlying language, specifically), the operator Or can be used.

2 Likes

How and where do you want to use the logical operator OR .What activities to be exact @Ugyen_Penjor1

cheers :smiley:

Happy learning :smiley:

1 Like

I just want to implement OR operator inside the condition If statement of UIpath

1 Like

@Ugyen_Penjor1

It depends upon the languge that you use in UIPATH.

cheers :smiley:

Happy learning :smiley:

2 Likes

@Ugyen_Penjor1

if you are using
VB.Net = use the word OR
C#.Net = ||

Hope it make sense and helpful to you.

cheers :smiley:

Happy learning :smiley:

2 Likes

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.operator

The screen shot aare shown to you.

1 Like

@Ugyen_Penjor1

Try these
Status=“Expred” OR Status=“Terminate”

cheers :smiley:

Happy learning :smiley:

1 Like

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.

4 Likes

Thanks that worked

1 Like

No worries @Ugyen_Penjor1

Happy to help here :smiley:

cheers :smiley:

Happy learning :smiley:

1 Like

Thanks your solutions too worked.

1 Like

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

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.