Convert number as string to integer

Hello!
I have a number as string “12,548,345.75” and I want to check how I can convert this to a number. Format function throw me some error unless i remove the comma in my string.

My goal is to multiply this string value to a static number.

Thank you and appreciate it.

Regards,
Faye

Hi,

Flow has a function to strictly cast a string to number:

But the commas would have to be removed for it to work.
So you could do something like this:
val(replace(x,‘,’,‘’))

Flow would also try to automatically assign type to a variable so multiplication should work even if you don’t do val() but just do replace() (but i guess if you wanna be sure its a number…then val() it! :slight_smile: )

Also if you want an integer value out of it then you can use Round()

Hope this helps!

B R
Ivan

1 Like

Hi @ivstde
Absolutely amazing!
Thank you as always.
You are like my online guru.
This forum is really really helpful.
Regards,
Faye

2 Likes