Missing line in dataport whenusing OnAfterFormatField

jordi79
Member Posts: 280
Hi All,
i am having some problems in dataport. When I use OnAfterFormatField trigger to assign values to variables that will be exported to a file, the last record is always not exported.
Please refer to object attached... I am using version 5 to perform the tests. The object id is in the range of 80010. And the dataport fileformat is fixed
You can see from the object below, I have filtered the integer table from 1..5. So the export should show 5 lines. But the text file exported only show 1 to 4. With the first line being blank.
Object in text below...
i am having some problems in dataport. When I use OnAfterFormatField trigger to assign values to variables that will be exported to a file, the last record is always not exported.
Please refer to object attached... I am using version 5 to perform the tests. The object id is in the range of 80010. And the dataport fileformat is fixed
You can see from the object below, I have filtered the integer table from 1..5. So the export should show 5 lines. But the text file exported only show 1 to 4. With the first line being blank.
Object in text below...
OBJECT Dataport 80020 temp test 123 { OBJECT-PROPERTIES { Date=23-11-09; Time=[ 4:21:38 PM]; Modified=Yes; Version List=TEMPTEST; } PROPERTIES { FileFormat=Fixed; } DATAITEMS { { PROPERTIES { DataItemTable=Table2000000026; DataItemTableView=SORTING(Number) ORDER(Ascending) WHERE(Number=FILTER(1..5)); } FIELDS { { 1 ;10 ;Val1 ;OnAfterFormatField=BEGIN Val1 := '_' + FORMAT(Integer.Number) + '_'; END; } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } CODE { VAR Val1@1000000000 : Text[30]; BEGIN END. } }
0
Comments
-
I think I found my own solution. It is working after I changed the coding to use OnBeforeExport record instead of OnAfterFormatField.0
-
jordi79 wrote:I think I found my own solution. It is working after I changed the coding to use OnBeforeExport record instead of OnAfterFormatField.
That is what I wanted to suggest. OnAfterFormat is mainly for manipulation with the Text parameter which is passed there. You can use it like:{ 1 ;10 ;Val1 ;OnAfterFormatField=BEGIN Text := '_' + Text + '_'; END; }
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