SETFILTER

RoiRoi Member Posts: 33
Hi,

I want to SETFILTER for Customer Posting Group <> 'A','B','C'

I wrote code as

Cus.SETFILTER("Customer Posting Group",'<>%1|%2','A','B');

but it is taking only first parameter how can I avoid A and B.like wise I have 9 parameter to set

pls advise

thanks

Comments

  • garakgarak Member Posts: 3,263
    The Pipe (|) is here not the correct medium. If you need to except some data you must add these with the & sign.
    Cus.SETFILTER("Customer Posting Group",'<>%1&<>%2&<>%3','A','B','C');
    
    //also you can use
    Filterstring := '<>A&<>B&<>B';
    Cus.setfilter("Customer Posting Group",FilterString);
    
    //and this based on strsubstrNo
    Filterstring := strsubstno('<>%1&<>%2&<>%3','A','B','C');
    Cus.setfilter("Customer Posting Group",FilterString);
    

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.