personally dataport

eli.vidal
Member Posts: 35
sorry, but my english is not good
i want to personally a dataport to import customers of a .txt
In the .txt I have this format:
"Steve, ...
Jan, ...
Mary, ...
..."
I want to import data like: "CL
"CL1Steve, ...
CL2Jan, ...
CL3Mary, ...
..."
if this question is too simple, sorry... but I'm a beginer...
thanks
eli
i want to personally a dataport to import customers of a .txt
In the .txt I have this format:
"Steve, ...
Jan, ...
Mary, ...
..."
I want to import data like: "CL
"CL1Steve, ...
CL2Jan, ...
CL3Mary, ...
..."
if this question is too simple, sorry... but I'm a beginer...
thanks
eli
0
Comments
-
We're here to help beginners (and sometimes also experts).
You have to create a few globals :
-intEntryNo of type integer
-txtHelp of type text100;
In the "OnPreDataItem()"-trigger of the dataitem, you must putintEntryNo = 0;
In the "OnAfterImportRecord()"-trigger of the dataitem, you must putintEntryNo += 1; txtHelp := 'CL' + FORMAT(intEntryNo) + Name); // I supposed that you read the name into the "Name"-field of the customer Name := COPYSTR(txtHelp,1,MAXSTRLEN(Name)); // this in case the string becomes longer than the maximum string you can put in "Name". This code avoids a run-time error.
I hope I understood what you wanted.
PS : in the beginning, also the specialists were beginners 8)Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Of course, there are other ways, but I think that the kriki's way is the simplest one. If you want to know other ways, ask for more... :-)
And as Kriki wrote: I was begginer too (and still I am sometime ;-))... may be that in some time you will answer the questions there...0 -
that's great!!!
I really happy because it's a very good reply...
thanks
eli0
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