Hello.
I need to filter data shown on a table box according to the data retrieved.
Simple example: I have a form linked to Table Sales Invoice Header and a Table Box.
I would like to see only the records where Sell-to Customer No. <> Bill-to Customer No.
I tried to add filter to Form On_Init (and other triggers too)
SETFILTER("Sell-to Customer No.", '<>%1', "Bill-to Customer No.");
But this has no effect. Is this just too simple or am I looking from a wrong point of view?
Answers
The filter setfilter(Field,'<>%1',Field2); //Field2 <- must have a value it's not dynamic (not so simple).
So for your solution you must go through (loop) the rec's.
The Recs, where Sell-to Customer No." <> "Bill-to Customer No." you store (for example in a temporary table, don't use mark if you have many records in your table and you are under sql) and after your loop you show the founded records.
Regards
You could add a flowfield that returns the equation and filter on that...
My actual task was a bit different from my example but you helped me to see what the problem is. I finally added a field to source table, evaluated my comparison to it and filtered by this new field.
I'm not totally comfortable with this but it does what I wanted.