Convert any variable to Generic Value

Hi everybody!

I need to use Format Value activity but in order to do that, I need to convert my initial variable of type double to Generic Value since Format Value only accepts this kind of input argument. Is there any fast way to do it except for creating temporary generic value variable that will store this initial double variable?

In general - is there a way to convert any kind of variable to generic value? Something like CInt or ToString etc.


can you show us with example what you want to achieve with Format value activity…
we would like have sample input and out

maybe this could help:

Hello @Marta,

Please find below URL that could help,


you could also use a invoke code activity.


For example:

I have value 2 (it is of type double) and I want it to be 2.0


I have 2000 and i want it to be 2,000.0

What do you mean by use invoke code activity? How exactly?

you can do it directly on the double value:


I guess below statemets would do your job,

Dim vIn As Double = 0.0.
Dim vOut As Decimal = Convert.ToDecimal(vIn)

try below:
Strings.FormatNumber(strVal) you can pass decimal variable as well
Strings.FormatNumber("20000") >>> 20,000.00

but please note that this is going to give you 2 decimal place[20,000.00 instead of 20,000.0]

1 Like