XML import
Christian_Wandborg
Member Posts: 23
Hi,
While importing an XML-file using an XML-port, I’m facing trouble because my XML-file contains an element with a string length of 1033 characters. Sometimes the element contains even more depending on the file at hand.
Actually I don’t need to import the element, but my import fails because of the string length.
Any suggestions please?
While importing an XML-file using an XML-port, I’m facing trouble because my XML-file contains an element with a string length of 1033 characters. Sometimes the element contains even more depending on the file at hand.
Actually I don’t need to import the element, but my import fails because of the string length.
Any suggestions please?
Regards
Christian
Christian
0
Answers
-
What error message you are getting?
if you dont need to import it you can reduce the string before importing the XML(COPYSTR)0 -
Well, I may not be using COPYSTR right, but here is my code on the "Description - Import::OnAfterAssignVariable()"
InOrdDocLine.Prod_Description := COPYSTR(Temp_Description, 1, 20);
InOrdDocLine.MODIFY;
(InOrdDocLine reffering to my receiving table and Prod_Description reffering to table field)Regards
Christian0 -
Christian Wandborg wrote:Well, I may not be using COPYSTR right, but here is my code on the "Description - Import::OnAfterAssignVariable()"
Use it in Import::OnBeforeInsertRecord() of receiving table0 -
Not quite enough...I get the message:
The value "..." has a length 1033, which exceeds the max size of the destination type Text.Regards
Christian0 -
As per your screenshot, the table name is Product.
so useProduct.Description := COPYSTR(Product.Description,1,20);
0 -
My receiving table is InOrdDocLine declared as a variable in my XML-port.
Using 'Product.Description := COPYSTR(Product.Description,1,20);' generates an error that the variable 'Product' does not exist,
and 'InOrdDocLine.Prod_Description := COPYSTR(Temp_Description, 1, 20);' fails generating no error message.
Anyway, is there a way to completely bypass the element? As mentioned I really don't need to import it. It just fails because of the string length.Regards
Christian0 -
Set Temp_Description to blank in OnBeforeInsertrecord.0
-
Of course...
Thank you Regards
Christian0
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
- 322 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
