Hi Everyone!
I would like to know if there's any way to convert a string data to a number, with all thousand and decimal separators
Example:
Before
1,000,500.23 (String)
After
1,000,500.23 (Number)
The main idea is summarizing some fields in excel from the output in order to validate totals, due to string data can only be counted
Thanks for your response.
I still get a conversion error with the other value using your workflow: "ConvError: Multi-Field Formula (2): TONUMBER: 1,223,234.23 stopped converting at a comma. It might be invalid." The multi-field tool confg'd to change output type to Double(8) results in a value of '1' 😞
What is exactly the expression you use for the Multi-Field Formula?
I used tonumber([_currentfield_]) with the field I wanted to convert selected and the option to change it into double. It should work with the workflow I posted on friday.
@apathetichell Didn't work for me.
Once I wrote the statement and dragged the Select Tool to convert the Sales field into a double value, I got this:
A Corporate 497
B Home Office 269
C Home Office 134
D Corporate 475
E Home Office 808
That means after running the workflow with the formula (ToNumber([Sales]), it only processed the first three characters of the string value.
Again - you can confirm that you aren't set up for European style "," for decimal separator - right?
When I run this through my workflow I can sum them as numbers and get this:
2,186,003.25
Also to clarify -don't use the select tool to convert to double. use the multi-field to convert. The select tool can be useful sometimes for converting integers but I would never use it to convert to double. Also - to clarify - I used the select tool in my workflow only to show you that I was taking a string and turning it into a double.
Try using a formula tool, ToNumber, and rounding. This worked for me when using just ToNumber didn't.
Round(ToNumber([Field]), .0000001)