Options

Problem with SETFILTER

poppinspoppins Member Posts: 647
Hi everyone,

I am trying to use SETFILTER for multiple values of Item No. and I am not sure about the syntax to adopt:

I want to set a filter to consider only the items with the following numbers:1000, 1030, 1056 and 1999.
recItem.SETFILTER("No.", '%1&%2&%3&%4', '1000', '1030', '1056','1999');

Is it correct???

Answers

  • Options
    lvanvugtlvanvugt Member Posts: 774
    recItem.SETFILTER("No.", '%1|%2|%3|%4', '1000', '1030', '1056','1999');
    
    As you will never find a record that has Item No. equal (at the same time) to the values '1000', '1030', '1056', '1999'
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • Options
    poppinspoppins Member Posts: 647
    Thanks :D
  • Options
    ChinmoyChinmoy Member Posts: 359
    recItem.SETFILTER("No.", '%1|%2|%3|%4', '1000', '1030', '1056','1999');

    This should work, as '|' means OR not AND.
Sign In or Register to comment.