If statement just go to "else"


#1

Hello,

I have a issue in a “invoke workflow” activity. At a certain point i have to compare a variable (filename) taken from the main process and compare it with a file name in another variable in a “invoke workflow”.

The If statement always goes to “else”, I know that this is wrong and that “then” should be the correct answer several times.

Could anyone help me troubleshoot this?


#2

Try printing both the values and check whether they are exactly same or not!


#3

Thanks! I had to make a smaller number of files to check first since the folder contains above 90 000.

I see that one of the values ends on .XML and the other on .xml.

Will UiPath be able to see the difference between capital letters and small letters? or could this be the issue?


#4

Hi! When comparing you can use YourVariable.Tolower
This will convert your string to lower case!


#5

This solved the problem :smiley: Thanks!