Problem importing XML with space char in decimal values

lzr
Member Posts: 264
I have an XML file where the thousand separator is coded like this
No matter how I do try to solve it with text strings, strpos etc I can't get it to work. Does anyone have an idea on how to import this?
XML:
<MASS>81 018,667297284</MASS>
NAV just gives me the error message:
You cannot enter 81 018,667297284 in Decimal
No matter how I do try to solve it with text strings, strpos etc I can't get it to work. Does anyone have an idea on how to import this?
XML:
<MASS>81 018,667297284</MASS>
IF STRPOS(InMass, ' ') > 0 THEN InMass := DELSTR(InMass, STRPOS(InMass, ' '), 6); IF InMass <> '' THEN EVALUATE(drawing.Mass, InMass);
NAV just gives me the error message:
You cannot enter 81 018,667297284 in Decimal
Navision developer
0
Comments
-
Is it stil leaving a space in the InMass after 81 when you delete the string, as you say, you cannot enter 81 018,667297284 in Decimal
IF STRPOS(InMass, ' ') > 0 THEN InMass := DELSTR(InMass, STRPOS(InMass, ' '), 6); //Remove spaces inside the string //NewString := DELCHR(String[, Where][, Which]); //If Where contains =, then all the spaces are deleted from String InMass := DELSTR(InMass, '='); IF InMass <> '' THEN EVALUATE(drawing.Mass, InMass);
This should now have 81018,667297284 in the Variable INMass
HTH
DavidAnalyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0 -
Thanks but the problem is that this does not trigger:
IF STRPOS(InMass, ' ') > 0 THEN InMass := DELSTR(InMass, STRPOS(InMass, ' '), 6);
I am guessing that it's a problem where NAV interprets as a special character. I have tried with just the strpos(InMass, ' ') but that doesn't trigger eitherNavision developer0 -
Hi
Can you screenshot the actual error message, is the value always to the same number of decimals or variable, and confirm that the comma ',' is the decimal point?
Regards
DavidAnalyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions