Get Fieldvalue by Number

kszymanski
Member Posts: 42
Hi!
i want to save the content of a table in a file. I have a array (Integer) with all Fieldnumbers i wan't to save in the File (last item ist a 999999 to find where to stop). The following Code is only an not working example to show the problem i want to solve.
Thanks for your help!
Best regards,
Kai.
PS: I know i can use Filehandle.WRITE(Table) to save the content...but
thats not what i want
i want to save the content of a table in a file. I have a array (Integer) with all Fieldnumbers i wan't to save in the File (last item ist a 999999 to find where to stop). The following Code is only an not working example to show the problem i want to solve.
IF Table.FIND('-') THEN REPEAT Index := 1; REPEAT // Here the problem comes :) I wan't to save the // Value of Fieldno $Fieldnoarray[Index] into the file...but // i dont know how to do this ;) Filehandle.WRITE(FORMAT(Field.??? )) Filehandle.SEEK(Filehandle.POS - 2); UNTIL Fieldnoarray[Index] = 999999; Filehandle.WRITE(''); UNTIL Table.NEXT = 0;
Thanks for your help!
Best regards,
Kai.
PS: I know i can use Filehandle.WRITE(Table) to save the content...but
thats not what i want

--
Kai Szymanski
Abt. eBusiness
D. Schuricht GmbH & Co. KG
Kai Szymanski
Abt. eBusiness
D. Schuricht GmbH & Co. KG
0
Comments
-
With Navision Financials (2.xx) you can't do this because you cannot access the field values dynamically.
In Navision Attain (3.60 ..) you can use RecordRef and FieldRef to access the values dynamically.
Example:RecRef.OPEN(Customer); IF RecRef.FIND('-') THEN REPEAT FOR I := 1 TO RecRef.FIELDCOUNT DO BEGIN FldRef := RecRef.FIELDINDEX(I); FileHandle.WRITE(FORMAT(FldRef.VALUE)); END; UNTIL RecRef.NEXT = 0;
Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]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