Setselectionfilter(record)

mark_christsmark_christs Member Posts: 156
dear All,
I wonder about this coding (A and B) structure different that I put in a commandbutton as follows:
coding A:
record2.SETCURRENTKEY("fieldx",record2."fieldx");
record2.SETRANGE("fieldy","fieldy"::rr);
record2.SETRANGE(record."fieldz","w");
FORM.RUNMODAL(FORM::"UUU",record2);


coding B:
CurrForm.SETSELECTIONFILTER(record1);

How to differentiate them..?
I would welcome to receive your answers. Thanks in advance.


Rgds,
Mark

Comments

  • BalelloBalello Member Posts: 61
    record2.SETCURRENTKEY("fieldx",record2."fieldx");

    It's a nonsense. Setcurrentkey doesn't filter but set the order.

    Currform.SetSelectionFilter mark all selected records on the variable and set filer to Only Marked. So the button will return a record with "static filter" on the first choice and a "user defined" filter on the second.

    Moreover, the first choice opens a form.... :-)
    I don't envy anybody who caught up his aim. I travel gladly.
Sign In or Register to comment.