Help: Getting error in IF Expression

Hi,
I am new to UiPath and getting following error can anyone help me in this issue?

Thanks

Hi,

The expression you provided has a syntax error. In UiPath, the correct syntax for an If activity expression is as follows:

If("john" = "john", "True", "False")

Thanks,
Vinit Mhatre

Hi @Random_Bot

Use the below,

If("John"="John",True,False)

Check the below image for better understanding,
image

Hope it helps!!

1 Like

Thanks @Vinit_Mhatre and @mkankatala for your help

1 Like

Hi @Random_Bot

1 Like

It’s my pleasure,

Don’t give double quotes to True and False like this “True”,“False”. It will take it as a String.
If you give with out double quotes like this True, False. It will consider it like a boolean.

Do changes as your need. @Random_Bot

Happy Automation!!

1 Like

Actually i need to print string as my output, i dont need it as boolean

Then you can use that solution what you have marked. @Random_Bot

Happy Automation!!

1 Like

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