problm in dataport

vikas
Member Posts: 46
Hi,
I have a query regarding dataport.
I have a text(csv) file which looks like this
No,Name,Address
Item No,Quantity,Price
Now i want to push 1st line to the customer table & 2nd line to the item table.
Please help me in this regard.
Thanks,
Vikas S. Shettar
I have a query regarding dataport.
I have a text(csv) file which looks like this
No,Name,Address
Item No,Quantity,Price
Now i want to push 1st line to the customer table & 2nd line to the item table.
Please help me in this regard.
Thanks,
Vikas S. Shettar
0
Comments
-
You can use this by setting 2 dataitems on dataport. Be sure that you set RecordSeparator (usually <NewLine>) and DataItemSeparator (usually <NewLine><NewLine>).
If you have only 2 lines as you said your DataItemSeparator should be also <NewLine>.®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
You confuse people by posting a question on many places (I have seen at least 3). Please don't crosspost...®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Heya,
Is there also a way to have 1 dataport to grab the first 3 columns of a CSV file and put them in a table in Navision, and 3 other columns of the same CSV file in another table? Or do i have to write 2 dataports for this?
Any help would be much appreciated0 -
@Phan
Maybe it is better to make a new topic.
You can make 3 variables and use them in the dataport fields. In the OnAfterImportRecord() trigger you can read the second table from a variable table and store the data in the table.0 -
you can create noraml dataport for first table - define only first 3 dataport fields as fields from first table.
then define recored variable and 3 variables for 3 other fields (of proper type).
Define this other 3 vars as 4th 5th 6th dataport field (you have to type them).
then use proper trigger (onafterimport) to write simple code:
rTable2.Field1 := cdMyCodeVar;
rTable2.Field2 := tMyTextVar;
rTable2.Field3 := dcMyDecimalVar;
rTable2.INSERT;
be sure to empty variables before importing otherwise value from previous rec can be inserted.
BTW, as I can see now Mark was faster...®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Thanks for the fast help.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