I have a table with column “AssetType” (LENOVO and ASUS for example) and I want Activity If to sort that AssetType. But the if activity can’t detect my intended condition (eg. row(“AssetType”).ToString = “LENOVO”) even though UiPath has read my for each row correctly (row(“AssetType”).ToString is printed “LENOVO” correctly but its cannot compare with = “LENOVO”). I’ve been using switch cases but it doesn’t work either. If you are confused by my explanation, please take the time to check this simple workflow that I made. IfFailed.zip - Google Drive
Hi @efendi ,
Could you maybe try with the below Expression :
row("AssetType").ToString.Trim.Equals("LENOVO")
1 Like
Welcome to forums
I ran your workflow for the first row it is detecting correctly as LENOVO and you can see that it is coming in one line
Now when I run the second one it is coming as LENOVO and some space after that should be detected that where it is failing
So, you need add to your If condition as below
Hope this may help you
Thanks,
Srini
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.