Operator and placeholder in filter expression (PC0008)
When using SetFilter with placeholders (%1, %2, etc.), be careful about combining operators in the format string with placeholder values. The operators should typically be in the format string, not in the placeholder values.
A code fix is available for this diagnostic.
Example
The following code has operators mixed with placeholders incorrectly:
codeunit 50100 MyCodeunit
{
procedure FilterCustomers()
var
Customer: Record Customer;
begin
Customer.SetFilter("No.", '%1|%2', '10000', '20000'); // Correct usage
Customer.SetFilter("No.", '>%1', '10000'); // Correct usage
end;
}