Special Filter on Form

ta5ta5 Member Posts: 1,164
Hi
Is it possible to have a list form which shows (for example) all customers having a ZIP-Code of xyz --OR-- having the Blocked field set to yes.
I think this is not possible with filters only.
Many thanks in advance
H

Comments

  • s.delikostovs.delikostov Member Posts: 32
    You can MARK the records of the table that you want to see, and set MARKEDONLY filter.
    Stamen Delikostov
    Navision Solution Developer
    Intelligent Systems Bulgaria
  • ta5ta5 Member Posts: 1,164
    Thank you very much. Is the marking done on the OnOpenForm()-Trigger?
    Regards
    H
  • s.delikostovs.delikostov Member Posts: 32
    You can make the mark in OnOpenForm.
    You can also make it before run the form:

    IF Customer.FIND('-') THEN REPEAT
    IF (Customer."Post Code" = '1000') OR (Customer.Blocked <> Customer.Blocked::" ") THEN
    Customer.MARK(TRUE);
    UNTIL Customer.NEXT = 0;

    Customer.MARKEDONLY(TRUE);

    FORM.RUN(0,Customer);
    Stamen Delikostov
    Navision Solution Developer
    Intelligent Systems Bulgaria
  • ta5ta5 Member Posts: 1,164
    Looks cool? A (hopefully last question):
    How would the code look on the OnInit-Trigger?
  • s.delikostovs.delikostov Member Posts: 32
    OnOpenForm:

    IF FIND('-') THEN REPEAT
    IF ("Post Code" = '1000') OR (Blocked <> Blocked::" ") THEN
    MARK(TRUE);
    UNTIL NEXT = 0;
    MARKEDONLY(TRUE);
    Stamen Delikostov
    Navision Solution Developer
    Intelligent Systems Bulgaria
Sign In or Register to comment.