Exclusion filter in FILTERGROUP not working

If you use a Table Filter:
<>ABC&<>XCF it works fine.
Using a similar filter in a filtergroup does not work.
FILTERGROUP(10);
SETFILTER(“Location Code”, ‘<>%1&<>%2’, ‘ABC’, ‘XCF’);
FILTERGROUP(0);

How do you exclude many records?

I just cut and paste the above line in OnOpenForm of Form 38, and replaced ABC with BLUE and XCF with RED in a standard demo database and they work fine.

Where did you use that filter?

I don’t try but perhaps by setting the filter on different FilterGroup:
FILTERGROUP(10);
SETFILTER(“Location Code”, ‘<>%1’, ‘ABC’);
FILTERGROUP(11);
SETFILTER(“Location Code”, ‘<>%1’, ‘XCF’);
FILTERGROUP(0);

Same place, On Open Form

Will have to try again, the only observation is that some of the codes in the table have the & as part of the code. Such as AB&C but not the codes I was trying to exclude.

Yes, this works.
Seems the problem was the number of characters in the filter.
There is a max of 9 parameters but the practical limit for my filters was 5 so split it up into 3 filtergroups 7, 8 & 9 did the trick.
Many thanks lessi for the suggestion.