Appreciate any tips to solve this issue - I converted a V_Wstring (e.g., 123,456,777) into Double, that is, from string to numeric, but the output turned out to be missing data (e.g., 123). Wonder if I should choose another data type in the SELECT tool?
Solved! Go to Solution.
Hi @MikiA ,
You can use the ToNumber function, and output your field as double.
Attached a solution.
If you have multiple fields, you can use the multi-field formula:
thanks a lot - wonder if there's a single workflow to achieve the same outcome
Sorry what do you mean with 'a single workflow'?
You solution involves two steps - (1) ToNumber formula and (2) Select tool (converting string to Double).
Just curious if I can do it in one single step (assuming the select tool should allow me to convert string to numeric)
2 different possibilities:
- on the higher branch with the multifield formula which allows you to select multiple fields => 1 tool
- lower branch with a formula tool if you only have one field to cast. => you are right, you need a select after
With the multifield formula you can configure as follow:
Hence the result will be cast in double.
Data:
@MikiA You are correct in that you should be able to just use the Select Tool to do this. At times, it may be necessary to use the Formula or Multi-Field Formula Tools as @MinhLO pointed out to accomplish this, so having all of those techniques is good to have in your skillset.
Here's a quick illustration of the Select Tool, with some extra things to help show what's going on, but the basis is just the Select Tool. The formula tool here is just to ensure the value is VSTRING going into the Select Tool, so ignore that for your workflow. The Field Info Tools are just to validate the Field Type behavior, so you can ignore those pieces too for your workflow:
Hey @jrlindem,
Thanks for stepping in!
Maybe I missed something, but from what I understood @MikiA issue is related to his data in this format : 123,451. (coming in as a string)
Hence if you only use a select tool, as he did, it cast but truncates your value:
Which is why the formula ToNumber([X]) seems necessary to me, and the multi field formula does it + proper casting post formula application. What do you think ?
@MinhLO haha, yep, you're absolutely right! I missed the comma's in my Input example. Thanks for pointing that out. So if there are not additional characters that force the behavior to act as a string then you can use Select, but since there are comma's, to your point, you would need to use Formulas to tailer it or a Cleanse to strip off the special characters ahead of the Select Tool.
Thanks! -Jay
thanks - that's what I am looking for if SELECT tool cannot work in this use case.

