Filter Wildcards

CobaltSSCobaltSS Member Posts: 137
Hi all

I've read some of the posts regarding WildCards and filters. But all the examples only used one option. How do I apply the wildcard to the string below?

I had to change the real text, but the length of characters is the same, as is the "pattern" of the strings being used for the filters.
            lrecSalesInv.SETFILTER("Model Code", '%1|%2|%3|%4|%5', 'ITEM 1A', 'ITEM 2', 'ITEM 3', 'SOME', 'SOME 4');

I would like to replace it with something like:
            lrecSalesInv.SETFILTER("Model Code", '%1*|%2*', 'ITEM', 'SOME');

I'm using a 4.3 client with a 3.7B backend on SQL. Thanks for your help,

cheers,

Comments

  • ara3nara3n Member Posts: 9,256
    wildcards with OR ( | ) do not work.

    You could filter on one value, loop through it and then filter on the other.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    This will not work with setfilter (%1*).
    But with a little trick, it will work:
    Your example must be:

    recSalesInv.SETFILTER("Model Code", '%1|%2', 'ITEM*', 'SOME*');

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