Dataports - Removing the spaces between fields

Matt.Hill
Member Posts: 32
Hi
Just a quick question (I hope).
I've the need to make a dataport export file with no field delimeters, but instead a fixed-format file that is to feature no spaces between the fields.
e.g. for say an item I want to export:
Item No., Description, Vendor No. as:
Item001WatchVend001 (and not Item001 Watch Vend001 like I'm currently getting).
I've tried making one field end as soon as the previous finishes, but it tells me the field cannot overlap, even though I've changed the delimeters to 'None' throughout (incl. Field Seperator).
So my question is: how do I go about doing it? I've seen a dataport before that can handle such a scenario as an import file (but it was with a previous employer and have no means of checking how it was done :roll: ).
Thanks for any input guys!
Just a quick question (I hope).
I've the need to make a dataport export file with no field delimeters, but instead a fixed-format file that is to feature no spaces between the fields.
e.g. for say an item I want to export:
Item No., Description, Vendor No. as:
Item001WatchVend001 (and not Item001 Watch Vend001 like I'm currently getting).
I've tried making one field end as soon as the previous finishes, but it tells me the field cannot overlap, even though I've changed the delimeters to 'None' throughout (incl. Field Seperator).
So my question is: how do I go about doing it? I've seen a dataport before that can handle such a scenario as an import file (but it was with a previous employer and have no means of checking how it was done :roll: ).
Thanks for any input guys!
0
Comments
-
I dont know how many fields but you can use a text variable and then load it up:
OutputTxt := STRSUBSTNO('%1%2%3%4%5',"No.",Description,FORMAT("Unit Price"),FORMAT("Unit Cost"),"Base Unit Of Measure");
Clear any output variables after export, Hope this helps!Analyst 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 -
Should have added its 15 fields I'm outputting. I've considered putting it all in one string - think this is the route I'm going to have to go.0
-
Dataport-properties:
FileFormat=Fixed
FieldStartDelimiter=<None>
FieldEndDelimiter=<None>
Dataportfields-properties:
Enabled=Yes
SourceExpr= the variable you want to write
StartPos= the column in which the variable must start
Width=the width of the variable
But it is possible you have spaces in case you have items like this (the items have different lenghts) but it is necessary to be able to import it otherwise you don't know where a field ends and where the next field begins:Item ABCDEFGHIJKLMNOPQRST ABCDEFGHIHJ
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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