SETVIEW and GET

j.marseloj.marselo Member Posts: 102
I forgot and has been puzzled with combination of using SETVIEW in pre section and GET in aftergetrecord section.
I know that rec.SETRANGE and rec.SETFILTER are disregarded when later we use rec.GET. what about SETVIEW?

rec_a.SETVIEW(bla bla);
...
rec_a.GET(p_key);

My temporary conclusions is, GET will disregard the earlier SETVIEW. Anyone can confirm this?
Thank you very much.
Kind regards, Joe Marselo | see my NAV blog joemarselo.wordpress.com | twitter @joemarselo

Answers

  • krikikriki Member, Moderator Posts: 9,112
    Correct: GET will ONLY use the primary key fields to get the record and you need to specify those fields as parameters in the GET-statement.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • j.marseloj.marselo Member Posts: 102
    2 masters can't be wrong. thanx a lot Allain!
    Kind regards, Joe Marselo | see my NAV blog joemarselo.wordpress.com | twitter @joemarselo
  • vaprogvaprog Member Posts: 1,141
    SETVIEW Function (Record)
    Sets the current sort order, key, and filters on a table.
    GET Function (Record)
    Finds a record based on values stored in primary key fields.
    ...
    Remarks
    This function always uses the primary key for the table and ignores any filters. The current key and filters are not changed after you call this function.
    Filters set by SETVIEW are no different from filters set any other way.
Sign In or Register to comment.