[solved] Dataport Export separate Field

SV_Will
Member Posts: 12
Hi, I´m trying to create a Dataport to export into a txt file. Each field is seperated with ; but I need to seperate a NAV field into 6 different fields in the txt file eg:
Z5.30-35.hj.zd -> z5;30;35;hj;zd
Any ideas?
Thanks
Z5.30-35.hj.zd -> z5;30;35;hj;zd
Any ideas?
Thanks
0
Comments
-
just to get you started.
Make 6 global variables and use them as dataport fields
now use the copystr function in the onbeforeexportrecord to cut youre field into pieces and assign the pieces to the variables.**********************
** SI ** Bert Van Gestel **
**********************0 -
or you just can replace the dots and minus signs with semi's
and export the field**********************
** SI ** Bert Van Gestel **
**********************0 -
I'm trying to do something similar but I want to STRIP out special characters.
My Dataport is on Customers with three fields:
"No."
"Postal Code"
Name
I want to remove all special characters from the Name field and I thought I could use DELCHR somehow in the OnBeforeExportRecord():
Name := DELCHR(Name,'=','-_+=\|[]}{".,#$@%^&*+!~`:;/?><');
How do I reference the Name field make my changes before the information gets exported?Half-empy or half-full how do you view your database?
Thanks.0 -
Instead of using the actual Navision Fields Like Name.
For Import Example
Create a variables called
vName Type Text.
txtCharstokeep Type Text.
On the dataport fields instead of putting Name you type in vName.
Now add the codetxtCharsToKeep := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '; Customer.Name := DELCHR(vName,'=',DELCHR(vName,'=',txtCharsToKeep));
or your way..................Customer.Name := DELCHR(vName,'=','-_+=\|[]}{".,#$@%^&*+!~`:;/?><');
For Export Example
Switch the places where Customer.Name & vName are in the code.
On the dataport fields instead of putting Name you type in vName.vName := DELCHR(Customer.Name,'=','-_+=\|[]}{".,#$@%^&*+!~`:;/?><');
Now it will export the vName field with the corrections you wanted.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