I am having an issue when trying to evaluate a text into decimal. First thing, I am doing an extraction of values between the ; symbol from a field in NAV (The field is of type Text)
My field value is: 9 469;2 178;0;-1 000;0;0;0;37 994,96;1 000;0;0;0;493,4;0;0;0;
When extracting, it becomes to:
Example:
9 469
2 178
-1 000
etc..
After extracting, I need to convert the text to a decimal which is of:
CodeConvert := '9 469'
EVALUATE(Primo,DELCHR(CodeConvert,'=',' '));
But when doing the Evaluate, I do get an error message of:
Microsoft Dynamics NAV
The value "9 469" can't be evaluated into type Decimal.
--------------------------- OK
I have found the issue for this. Actually there was a special character which NAV was inserting in the space in the decimals. If ever you use delchr and visually it is a space ' ' and it is not deleting.
Then your best friend is notepad. Extract the value on notepad and copy & paste that spacing ' ' to your delchr function. Conclusion, it was not a space being added but a special character and since visualy it appeared as a space, first impression was it is a space :)
Worked like this for me!