Hi SME,
I have a set of numbers - all double - and I'm trying to convert them into currency format. For example, I have 5235.32342 and want it to show up as $5,235.32. I used the Multi-Field Formula with the following formula: '$'+ToString([_CurrentField_],2,1) and I kept the error that says "The formula - field name - resulted in a string but the field is numeric. Use ToNumber(...) if this is correct.
I tried to incorporate the suggest ToNumber into the above formula as follows: '$'+ToString(ToNumber([_CurrentField_]),2,1). Now, I got the error that says "The formula - field name - resulted in a string but the field is numeric. Use ToNumber(...) if this is correct.
What am I missing in this error loop? Any suggestions?
Thanks,
K
Solved! Go to Solution.
Hey @knnwndlm, did you ensure to set this option in the Multi-Field Formula configuration? If not, the outgoing fields' data type will still be numeric, hence the error:
Thank you All! It's missing Output Type - hence, the error.
Hi All,
How do I apply the Round formula to the formatting expression? I got an error with the following: '$'+ToString(Round([_CurrentField_]),1),2,1). The error kept saying wrong number of parameters for the function ROUND.
Thanks,
K
When I created a Var % field as a Fixed Decimal, I tried to apply the Round formula in the Formula tool as follows: ToString(Round([VAR %]*100,0.1))+'%'. I kept getting the error "The formula VAR % resulted in a string but the field is numeric. Use ToNumber(...) if this is correct."
I don't understand this. It's already numeric so why is the error telling me to add ToNumber(). If I added it, I got the same error. What I want to get is to convert something like 0.0357 tp 3.6%
Please help me understand.
Thanks,
Konn
Hi @binuacs
Interesting! That's almost exactly what I have and still got the error. I couldn't change the Data type to String. It's got stuck as Fixed Decimal.
I was able to get it to work with ToString(Round([_CurrentField_]*100,0.1),1,1)+'%' in the Multi-Field Formula tool. Still don't understand why Formula tool's not working.
Thanks,
Konn