NickWeijns
(Nick Weijns)
September 11, 2019, 7:07am
1
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
HareeshMR
(Hareesh Madasi)
September 11, 2019, 7:09am
2
Can you try as
row(“Status”).tostring.contains
@NickWeijns
1 Like
Hi
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
row(“Status”).ToString.Equals(“Gereed”)
So only if this condition passes it will go to THEN part
Hope this would help you
Cheers @NickWeijns
1 Like
NickWeijns
(Nick Weijns)
September 11, 2019, 8:12am
5
I’ve tested it through mutiple strings and it indeed works better by usingToString.Contains(“Gereed”).
Thanks for the input.
Nick
AndyD
(Andy)
September 11, 2019, 9:29am
6
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
NickWeijns
(Nick Weijns)
September 11, 2019, 9:42am
7
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
AndyD
(Andy)
September 11, 2019, 9:56am
9
That will be fine in this instance then
Good Luck
1 Like
system
(system)
Closed
September 14, 2019, 9:56am
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.