Hi,
Im trying to convert the following string values into numbers:
Input String | Output Double |
- | 0 |
123.2 | 123.2 |
-1234.2 | -1234.2 |
I tried using Replace but then the "-" in front of the negative gets replaced as well. Not sure if this can be done with RegEx?
Thanks in advance!
K
Solved! Go to Solution.
Quick Answer: DON'T USE RegEx!!!!
Use a Multi-Field Formula and:
Uncheck Copy Output Fields...
Check Change output type to Double
IIF([_CurrentField_]== "-",'0',[_CurrentField_])
Cheers,
Mark
Hey @kailash85 ,
You can use a conditional formula like the following.
if [Input String] = " - "
then "0"
else [Input String]
endif
Hey @kailash85,
@MarqueeCrew is right on, just make sure you catch your leading and trailing whitespace in your conditional statement.