RecordRef and GET?

mr.burnsmr.burns Member Posts: 39
Hello,

I have the values (V1, V2, V3) available for the primary key.
Now I want to use the GET command to get the record defined by V1, V2, V3.

Using a record it is simply:

Table.GET(V1, V2, V3);

How can I use GET for a RecordRef instead of a Record variable?

Thanks for any help!

Comments

  • krikikriki Member, Moderator Posts: 9,110
    With fieldreferences, you can fill up the primary key-fields, then you can do a FIND('=') on the recordreference. But be sure you don't have any filters on it anymore.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mr.burnsmr.burns Member Posts: 39
    Thanks for reply but can you give an source example please?

    Thanks!
  • krikikriki Member, Moderator Posts: 9,110
    rer : recordreference
    fir : fieldreference

    rer.OPEN(DATABASE::"The Table");
    
    fir := rer.FIELD(1); // primary field 1
    fir.VALUE := "Primary Key Field 1 Value";
    fir := rer.FIELD(2); // primary field 2
    fir.VALUE := "Primary Key Field 1 Value";
    ...
    
    rer.FIND('=');
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.