Logical expression OR on Form propertis

IvonaKIvonaK Member Posts: 115
Hi to all,

Is there any possible way to put on SourceTableView on Form propertis two conditions associated with logical expression OR.
for example (Field1='A') OR (Filed2='B');

Any advice
Thanks a lot,

Comments

  • sourav_aitsourav_ait Member Posts: 15
    Not possible through sourcetableview. You can not have contradictory condition with in it. Try using some coding on Onopen() trigger of the form.
  • tinoruijstinoruijs Member Posts: 1,226
    No, that's not possible.
    To achieve this, you must mark records which you want to show and then open the form.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • IvonaKIvonaK Member Posts: 115
    Thanks a lot.
  • jlesagejlesage Member Posts: 3
    you could set SourceTableTemporary to Yes
    then in onOpenForm select the record needed


    Item.RESET;
    IF Item.FINDSET THEN
    REPEAT
    IF (COPYSTR(Item."No.",1,1) = '0') OR
    (COPYSTR(Item.Description,1,1) = 'A') THEN BEGIN
    REC := Item;
    INSERT;
    END;
    UNTIL Item.NEXT = 0;

    If the table is not too big.
  • IvonaKIvonaK Member Posts: 115
    Thanks a lot.
Sign In or Register to comment.