Text field error on Import Dataport (end-of-string char.?)

mart1n0
Member Posts: 123
I wrote a Dataport to import items. everything works perfect except for the following:
The description has a maximum length of 50, this field imports fine with a length up to 49, when the length is 50 it gives me an error that the field cannot be more than 50 characters. I guess this is because of the end-of-string character.
But if I enter a description manually I can add descriptions up to 50. Is there a way to import descriptions up to 50 characters without creating global variables and copy strings and such?
The description has a maximum length of 50, this field imports fine with a length up to 49, when the length is 50 it gives me an error that the field cannot be more than 50 characters. I guess this is because of the end-of-string character.
But if I enter a description manually I can add descriptions up to 50. Is there a way to import descriptions up to 50 characters without creating global variables and copy strings and such?
0
Comments
-
Check the string lenght of the description that you are trying to uploadDiptish Naskar
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/0 -
Well diptish.naskar that is exactly the problem the strings in the import file ARE all smaller than 50 characters and if I input them trough the forms I CAN enter descriptions of 50 characters but the import only lets me import up to 49 characters. If I try to import something that is 50 it gives me the error that the field cannot be bigger than 50.
So my guess is that it pastes an end-of-string character at the end making the field 51 and then gives an error.
What I wanted to know is if there is a work around without writing code for this.0 -
Hi
in the Description - OnBeforeEvaluateField(VAR Text : Text[1024]) section you could do this
IF STRLEN(Text ) > 50 THEN
Text := COPYSTR(Text,1,50);
Hope this helps
Albert
Edit. Sorry didn't read that you did not want to do it with code.0
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