Skip to content
+1-888-319-3663

COMMUNITY FORUM

Conversion Failed from string to double type

Tanya Henderson asked 3 years ago
I am getting this same error and I am trying to do a calculated field for a dollar amount.
if _REN_FEESCHEDULE_REN_FEETYPE = “Deposit” then
return _REN_TOTALPRICE*.35
else
return _REN_TOTALPRICE
end if
I have tried ToString on multiple places, but get the same error.
Help and thank you.
Tanya
Answers
Lorren Zemke answered 3 years ago
Tanya,
For each .net data type, they have the option to parse from a string. You can use Integer.Parse, DateTime.Parse, Decimal.Parse. 
The statement below will convert your string source column to a decimal so it can be multiplied by the .35.
return Decimal.parse(_REN_TOTALPRICE) * .35
 
https://docs.microsoft.com/en-us/dotnet/standard/base-types/parsing-strings
 

If you would like to submit an answer or comment, please sign in to the eOne portal.