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!
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
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
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?
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):
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
It does work.