Hello!
Im trying to filter a table (Employee) with the value from a flowfilter (AuxRecord.Filter) which is on another table (AuxRecord). its datatype is text30. Here's the code.
Employee.SETRANGE(Employee.Status,0);
IF NOT AuxRecord.GET(AuxRecord.AuxCode) THEN ERROR('ERROR');
AuxFilter := AuxRecord.GETFILTER(AuxRecord.Filter);
Employee.SETFILTER("No.", AuxFilter);
END;
The problem is that the flowfilter has no value on this code and nothing is filtered. #-o
Can you guys please give me a hand?
Best regards.
Comments
Employee.SETRANGE(Employee.Status,0);
IF NOT AuxRecord.GET(AuxRecord.AuxCode) THEN ERROR('ERROR');
Employee.SETFILTER("No.", AuxRecord.Filter);
END;
What you really want is for the AuxRecord to have been passed in, by Var, from a form / function, and have code like this (pretend this is a function)
function parameter _AuxRec (by var)
Employee.SETRANGE(Employee.Status,0);
Employee.SETFILTER("No.", _AuxRec.FlowFilterFieldName);
Employess.calcfields(..., or FIND...
-a
RIS Plus, LLC
let me try to explain you guys better.
what i really want to do is:
the AuxRecord table is a kind of "setup table" and the report will run according to the parameters that i setup in the table AuxRecord; and one of that parameters is that flowfilter (AuxRecord.Filter).
so i want to setup a filter previously, save it on the field AuxRecord.Filter, and then apply it to the dataitem. maybe setting that field (AuxRecord.Filter) as a flowfilter isnt the best solution... :-k
the reason for it be a flowfilter is that i want to validate the filter before i apply it, or else i can write "abcdefg" on that field and when applied it wont filter anything...
hope i have explained it well...
Best regards
Maybe you can add a new flowfilter to the resource table and use the setup table to save the last applied filter. This way the setup table field can be a textfield.
Hey! I see nice christmas emoticons
-a