if some name exists in filename column then it has to execute one workflow or when filename column is empty then it has to excute anoher workflow so how to write if else condition for this?
Hello @sathish_Kumar6 ,
Use For each and loop through the rows then
use the If Statement :
If(Not String.IsNullOrEmpty(row(āfile nameā).ToString))
in then Part you can execute the required flow which will execute only if file path is present
Else block you can add the other logic which will execute only if file path is empty
Regards,
Rohith
checking if it is empty
String.IsNullOrEmpty(yourStringVar.Trim)
will return true when it is blank
When involved within a for each row loop
isNothing(row(āfile nameā)) OrElse String.IsNullOrEmpty(row(āfile nameā).ToString.Trim)
hi i tried with If(Not String.IsNullOrEmpty(row(āfile nameā).ToString)) but this condition shows some error, so could u correct this please?
hi @ppr may i know how to implement this in my work flow i tried this but it shows some error
Hello @sathish_Kumar6 ,
2 Observations from the given screenshot.
-
As you already used If block hence you donāt have to write the If condition again, re-write it as Not (String.IsNullOrEmpty(row(āfile nameā).ToString))
-
ārowā is not declared, this is because you havenāt used the for loop outside. Use for loop as give n below :
Regards,
Rohith
thanks bro it worked and may i know to master if else conditions in uipath?
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.