How to from Field No. -->Value?

Oneway
Member Posts: 53
Hi Guys,
Is it possible to know the value of the certain Field No. of the record?
eg. I know current customer record is Cust No. 1234. and how can i know the value of field No. 9?
Is it possible to know the value of the certain Field No. of the record?
eg. I know current customer record is Cust No. 1234. and how can i know the value of field No. 9?
0
Comments
-
Put the record in a recordreference and then use fieldreference to find the value of the field you want.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks Kriki,
Actually, I do not know whick table/record is.
what i know is the value of the primary key and the table id and the field id which i want to know the value.
how to do it?0 -
Use a recordreference on that table.
Fill up the primary key fields using fieldreferences.
Do a GET or a FIND('=')
And use again field reference to get the value of the field.
Something like (I didn't test it):Lrer.OPEN(TableID); Lfir := Lrer.FIELD(Keyfield1); Lfir.VAlUE := 'The value1'; Lfir := Lrer.FIELD(Keyfield2); Lfir.VAlUE := 'The value2'; Lrer.FIND('='); Lfir := Lrer.FIELD(FieldN); MESSAGE('The Value is=%1',Lfir.VALUE);
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
If you already have a record being used I would go with:
varRecRef.GETTABLE(Rec); varFieldRef := varRecRef.FIELD("varFieldNo."); varFieldValue := FORMAT(varFieldRef.VALUE); //Since FieldRef.VALUE resultant is a Variant you must use some kind of formatting
0 -
Thanks Guys
It does work.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