How to solve Cnnot convert Generic Value to System.Decimal error?

I have two variables tax and total I want to get sum of these two variables and type into the output to a web page.
tax= 0,03 and total= 2.201,39 in web page number format is like this.
1-When I use format value I get "Cannot convert generic value to system.decimal error message.
2-Also I am getting output for tax as 3.00 in format value activity.
How can I solve this problem?
Thank you.


I prefer to use simple assign activities in this type of case.

for assigning decimal variable use ‘d’ at the end:

decimalVariable = 23.03d

for convering to decimal use (for instance from double and string):


to convert from decimal to string (we can use it in type into activities):


Hi @makboga ,

Could you also let us know what should be the sum of these values according to you which needs to be input in the web page ?

sum of two variables should be 2.201,42 format.

You can try French or German format :slight_smile:
Convertion to decimal:


Convertion to string:

decimalVariable.ToString("#,##0.##########",System.Globalization.CultureInfo.GetCultureInfo("fr-fr").NumberFormat).replace(" ",".")

Be careful - there is ‘non-breaking’ space in second expression

Hello @makboga
Did you try




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