Dataport - Convert data on import

nav_student
Member Posts: 175
Hi guys,
i want to know how can i convert data when importing data from a TAB file?
Example
1 Board
2 Tyre
3 Lights
and i can import data directly into the Item table ( Fields No. and Description), but how can i can convert data when i´m importing?
I want to see an example (C/AL Code) to convert the Description. For example when Nav read the Tyre converts to Car, so i the information on the table stays like this
No.----Description
1 Board
2 Car
3 Lights
Can you help me?
i want to know how can i convert data when importing data from a TAB file?
Example
1 Board
2 Tyre
3 Lights
and i can import data directly into the Item table ( Fields No. and Description), but how can i can convert data when i´m importing?
I want to see an example (C/AL Code) to convert the Description. For example when Nav read the Tyre converts to Car, so i the information on the table stays like this
No.----Description
1 Board
2 Car
3 Lights
Can you help me?
0
Comments
-
What have you tried so far? What errors are you getting? Did you read the spec that was written by the consultant? have you discussed with the functional consultant what they actually want?David Singleton0
-
nav_student wrote:...
Why do you want to program something complex can that be done in a few simple clicks?
Open the file with some text editing software
Ctrl + h
Find Tyre
Replace Car
Click replace allNAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
The name is nav_student perhaps he just want to learn. There's a whole chapter on dataports in the ADG which is downloadable too if you don't have the CD.
2nd. to accomplish this task I would import that data into variables
impCODE, impDESCRIPTION for example.
These name you will put in the Sourceexp of the dataport fields instead of the item table fields directly.
OnAfterImportRecord trigger you can map them back to the correct fields and give you the flexability of checking & changing the data if needed.Item.Validate("No.", impCODE); If impDESCRTIPION = 'TYRE' then Description := 'CAR' else Description := impDESCRIPTION;
that's the basics, now read up.
http://www.microsoft.com/downloads/deta ... laylang=en0 -
Thanks Savatage!
I test it and it runs OK.
=D>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