If condition to check %

Hi Guys,

I am getting and value and that is 5.00% and in if condition i want to check with if the Variavle<=10.00 then it goes to then condition if not in else. I am getting an error it is not matching all time it goes in else condition. Help me out in this.

Gaurav Kumar

Hi @Gaurav_Kumar2

Welcome to UiPath community buddy

if the value is 5.00%
then change it like this buddy where out_variable is of type double

Out_Variable = Convert.ToDouble(“5.00%”.Replace(“%”,“”).ToString)

Then use this variable in if condition buddy like this

Out_Variable <= 10.00


1 Like


Replace the value 5.00% to 5.00 using assign activity and then convert to double and then you can compare with other values.

Let us know if this helps,
Pavan H

Hi @Palaniyappan

it is working fine but when i writing it into an excel it is writing for example 7.20 instead of 720.

Thats something strange buddy,is that the only value facing this or is there another value getting changed like this

Can i the xaml if possible and xlsx file as well buddy


please help me with the xaml so that i can check that for you how ever the resolution that you got should be working

Buddy @Gaurav_Kumar2
No worries buddy this might help you

IfCondition.xaml (5.5 KB)


this issue coming for that value only in excel. So guys can not share that workflow as its a confidential.

Where you able to open the xaml buddy