The second parameter of SETFILTER must be text type. If you want to do (fieldname,variable) you can do SETRANGE(fieldname,variable). This only works for ranges and single values though.
The second parameter of SETFILTER must be text type.
Not if you are substituting the %1 in the SETFILTER statement. Then you have to have a matching type field.
eg SETFILTER("Posting Date",'%1',WORKDATE);
SETFILTER(Amount,'<>%1',VarAmount); // VarAmount type Decimal
SETFILTER("No.",'%1..%2',Var1,Var2); // Var1 & Var2 type Code
Comments
The correct syntax would be something like this
SETFILTER(FieldName,'<>%1',VARIABLE);
RIS Plus, LLC
Not if you are substituting the %1 in the SETFILTER statement. Then you have to have a matching type field.
eg SETFILTER("Posting Date",'%1',WORKDATE);
SETFILTER(Amount,'<>%1',VarAmount); // VarAmount type Decimal
SETFILTER("No.",'%1..%2',Var1,Var2); // Var1 & Var2 type Code
RIS Plus, LLC