How to Skip lines in CSV in dataport

scs_sathish
Member Posts: 19
Hi all,
while importing Data port i want to skip some lines in csv file... is that possible..??
e.g: im importing purchase line, purchase line has the item no. which does not exist in item master, so error says like-->item no. does not exist in the related table item..now i want to skip that line & import the remaining line...and also i want skip the document type if its not an option other than in purchase line.(the existing options are Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order). If user wrongly typed an option as payment or shipment, so in that case i want to skip that line too..
thanks & regards,
Sathish
while importing Data port i want to skip some lines in csv file... is that possible..??
e.g: im importing purchase line, purchase line has the item no. which does not exist in item master, so error says like-->item no. does not exist in the related table item..now i want to skip that line & import the remaining line...and also i want skip the document type if its not an option other than in purchase line.(the existing options are Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order). If user wrongly typed an option as payment or shipment, so in that case i want to skip that line too..
thanks & regards,
Sathish
0
Comments
-
You can use
CurrDataport.SKIP;
in the OnAfterImportRecord-trigger to skip a line.
PS: You are talking about Dataports, so this posting is in the wrong forum, right?No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Hi, Sorry im new to this forum..
I have used CurrDataport.SKIP , its working fine.
But if i used for option field, it shows error instead of skipping the line.
For E.g: I'm importing purchase line data, in one of the line has a document type as "Shipment" but there is no shipment in document type options.the existing options are Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order. so error says like--> there is no option called Shipment, the existing options are...
In that case i need to skip that line instead of showing the error..
Regards,
Sathish0 -
Instead of importing the CSV directly in the table, use text-fields instead. Then you can validate the input, before writing to the Purchase Line table. Create some variables of type Text, and replace your Dataport Fields with these variables.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Luc Van Dyck wrote:Instead of importing the CSV directly in the table, use text-fields instead. Then you can validate the input, before writing to the Purchase Line table. Create some variables of type Text, and replace your Dataport Fields with these variables.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