Input string was not in a correct format:Error

Hi all,

when i try to assign this variable it is getting error.
The value type of fbfark is Generic Value.
Anyone know why am i getting this error?


image

2 Likes

Hi @mazlumkacar
Do remove . ToString
And check the variable whether it is int variable

Thanks
Ashwin.S

Is fabric variable is of type int32
If not change that to int32 as we are explicitly converting our two string variables to int32 with convert.ToInt32 method

Cheers @mazlumkacar

the type of fbfark is Generic Value. But when i change is as integer, i am getting the same error.
and the type of another two variable is also generic value

Fine what is the value of those two variables used insid erhe convert.toint32 method
Use a writeline activity and mention those two variables alone as input without converting to int32 so that we can see the output panel and validate the value of them
Cheers @mazlumkacar

These are the values of them.

image

@Palaniyappan

1 Like

Is that text along the value added by you with string concatenation
If so
Kindly use this expression
dou_variable = Convert.ToDouble(your first variable)-Convert.ToDouble(your secondvariable)

Where dou_variable is of type Double

Cheers @mazlumkacar

i did it but now i am getting this error.

@Palaniyappan

1 Like

here you go with a xaml
kindly try with this and let know for any queries or clarification
double.zip (9.3 KB)
Cheers @mazlumkacar

2 Likes

Hi again @Palaniyappan

i have try to make it like you. Firstly, i have created two variables that type string. And then convert them to double. But when i try to convert them to double getting this error.


You can see my three variabes and their types here.

Kindly share that xaml if possible
@mazlumkacar

I extract and share the queries received from the database. Here you go

Process.xaml (15.5 KB)

1 Like

is that column having any special characters like - with the double value
@mazlumkacar

No, it has only integer values like 2100.0000 or 1746.5000
@Palaniyappan

Now i noticed that; this column has NULL values. Is that can be reason of this error?
@Palaniyappan

1 Like

yah in that case use this expression in the assign activity
IF(String.IsNullOrEmpty(row(“butcetutarcolumn”).ToString),0,Convert.ToDouble(row(“butcetutarcolumn”)))

Cheers @mazlumkacar

2 Likes

This is your second solution in this topic. But i have choosed another for soluitoun :sweat_smile:
Thanks again buddy @Palaniyappan

1 Like

Cheers @mazlumkacar

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.