Options

Request Form/GetFilter vs FilterString vs SetFilter

2»

Answers

  • remco_rauschremco_rausch Member Posts: 68
    Declare a text constant
    TextConstant <>@%1*&amp;<>@%2*
    Cust.SETFILTER("Company Name",STRSUBSTNO(TextConstant,company1,company2)

    Text constants are just a personal preference since * cause some versions of navision to get confused and text constants always work.
  • dohertykdohertyk Member Posts: 94
    Declare a text constant
    TextConstant <>@%1*&amp;<>@%2*
    Cust.SETFILTER("Company Name",STRSUBSTNO(TextConstant,company1,company2)

    Text constants are just a personal preference since * cause some versions of navision to get confused and text constants always work.
    Customer.RESET;
    Customer.SETFILTER("Link Customer No.",'<>%1&<>%2', 'Company1*','Company2*');
    Customer.SETFILTER("Customer Posting Group", '<>%1&<>%2&<>%3','INT*','BRANCH','Company2');
    Customer.SETFILTER("Credit Code", '<>%1','C3'); 
    Customer.SETFILTER("Gen. Bus. Posting Group", '%1|%2','LEASING', 'RENTAL');
    Customer.SETFILTER(Name,STRSUBSTNO('<>@*%1*&<>@*%2*','Company3','Company2'));
    

    This is the code that works... I thought I should post it in case someone else might need it one day. Or if I ever need to refer to it again.

    Thanks very much all of you,

    Kevin
Sign In or Register to comment.