Read entire line during OnbeforeImportRec from dataport

tompynation
Member Posts: 398
Is it possible to read an entire line from a csv file, instead of each record separtly?
I would like to have a string inside my OnBeforeImportRecord method
which contains the line from my csv file which is being read currently.
I would like to have a string inside my OnBeforeImportRecord method
which contains the line from my csv file which is being read currently.
0
Comments
-
Note: The record is read during the OnAfterImportRecord trigger
Create a text variable (max length 1024) and import the entire record to the variable. Then parse it in code.
You may run into issues if the records are not even length. You might be better of writing a codeunit and using the C/Side file commandsThere are no bugs - only undocumented features.0 -
how do i import the entire record to my text var?0
-
Specify your VAR as a dataport fieldThere are no bugs - only undocumented features.0
-
that is not working... am i doing something wrong?
I created a C/AL global variable:
Name DataType Subtype Length
volleRegel Dataport Import Prices
When i then try to display the var:
Message('Volle Regel: ' + FORMAT(volleRegel));
IF "Item No." = '' THEN BEGIN
itemCrossRefRec.SETRANGE("Cross-Reference Type No.", '10000');
itemCrossRefRec.SETRANGE("Cross-Reference No.", '20-587');
IF itemCrossRefRec.FIND('-') THEN BEGIN
"Item No." := itemCrossRefRec."Item No.";
END;
END;
I get the message: Volle Regel: In Use ](*,)0 -
Specify the global var as type TEXT 1024. The add it to the Dataport fields list. (Only item in list).There are no bugs - only undocumented features.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