Error when using the an if statement condition in For each row in data item

I was using this “age>25 AND salary>1000” statement in If condition, but I am getting this error,

Error ERROR Validation Error Compiler error(s) encountered processing expression “age>25 AND salary>1000”.
Option Strict On disallows implicit conversions from ‘String’ to ‘Double’.
Option Strict On disallows implicit conversions from ‘String’ to ‘Double’. Main.xaml

Can somebody explain me why this error occurs.

Hello @Lokesh_Raj_R_M ,

You should try this:
Convert.ToDouble(VariableAge) > 25 and Convert.ToDouble(VariableSalary) > 1000

I hope it helps.


1 Like

Hi Vasile ,

Thanks, but it is not working, let me know if any other method is available.


Can you post a screenshot with your flow?

Hi @Lokesh_Raj_R_M ,

Is your age and salary is having empty values at some place?

If so then use one more if above as if Not(String.IsNullOrEmpty(age) and Not(String.IsNullOrEmpty(salary) )

Hi @Lokesh_Raj_R_M

Welcome to uipath community

try with this expression in IF condition

IF(NOT String.IsNullOrEmpty(age.ToString.Trim),Convert.ToDouble(age.ToString.Trim)>25, False) AND IF(NOT String.IsNullOrEmpty(age.ToString.Trim),Convert.ToDouble(salary.ToString.Trim)>1000, False)

mention it like this


Hi Palaniyappan,

Thank you, but it is throwing me an error attached below

If possible can see what is mentioned in GET ROWITEM ACTIVITY, May be a screenshot

Hi Palaniyappan,
Here is the Screenshot, since I am learning Uipath, I’m not able to figure out the exact issue.

I believe we were discussing about the issue with IF condition and this is something new to discuss

Fine may I know what we are trying to get from get row item activity


Hi Palaniyappan,
Thanks for your help, I found out the issue, I didn’t mention the variable age and salary as int32, which caused me this issue. Now it worked out.


1 Like

Perfect @Lokesh_Raj_R_M