My If statement doesn't react to my condition

Hi all,

The cell in my excel file is returning the value I want. The problem here is that the condition of my if activity doesn’t react to my input.

When the cell contains the word ‘Gereed’ (it is a Dutch word) the then of the condition should do nothing but when I change it in the excel file to ‘Niet Gereed’ (also a Dutch word) is should return the Else output. This isn’t happening, can anyone explain why.

I hope you guys realize my issue and can help me.

Thanks in advanced.

1 Like

Can you try as


1 Like

It worked.

Thanks man!

Welcome to uipath community
In both the strings “Gereed” and “Niet Gereed” we have the term Gereed

So if we use ToString.Contains(“Gereed”) both the string will give us TRUE only anencephaly this it goes to THEN part of if condition certainly

In that case we need to use Equals method instead of Contains method

Like this

So only if this condition passes it will go to THEN part

Hope this would help you
Cheers @NickWeijns

1 Like

I’ve tested it through mutiple strings and it indeed works better by usingToString.Contains(“Gereed”).
Thanks for the input.


using .contains(“Gereed”) will return true in both circumstances unless the negatory option is spelled “Niet gereed” with a lower case g.

You would be better off using .contains(“Niet”) and swapping your true and false options around

1 Like

Thanks for the tip. In this circumstance ‘Niet gereed’ is always spelled wil a lower case g.

If that is in lower case then it’s fine
Cheers @NickWeijns

1 Like

That will be fine in this instance then

Good Luck

1 Like

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