I need to perform filtering on a lookup page that is used to populate a field on a request page for a report.
I would like to show a minimal version of the lookup page (the kind that is shown with a field, that only has “TableRelation” specified) as opposed to the full blown window with a title bar, frames and buttons.
Can this be done or does one always have to use the full list page when filtering is necessary?
Below is a screenshot of how i would like to present the data to the used for him/her to take their pick when they click the “arrow” button next to the input field.
I have entered filter code to the OnLookup trigger for the field in question, but I can only open the full framed version of the list page.
I failed to mention that i need to filter based on a value that is stored in a variable (received from input to an other input field).
I believe that in this case the i can not use the TableRelation property for the filtering, but instead filter in code in the OnLookup trigger in this case.
My filtering works just fine as is. What i want to know is how can i show a minimal listing for the resulting database rows for a user to take his pick.
By minimal i mean a a list that drops down (below the input field) instead of the alternative which is showing a full separate window that contains the rows (see the screenshot in the original post).
I think you are searching like this::(DimensioCode and Dimension values are two code type variables on Report, Dimension value lookup is limited by the dimension Code filter applied)
DimensionValueRec.SETRANGE(“Dimension Code”,DimensionCode);
IF FORM.RUNMODAL(FORM::“Dimension Value List”,DimensionValueRec)=ACTION::LookupOK THEN
BEGIN
Text := DimensionValueRec.Code;
EXIT(TRUE);
END;
Quite a late response, but maybe somebody can still find it useful:
I was looking for a solution myself for this problem : filtering the data shown by the tablerelation instead of rewriting the Onlookuptrigger which opens a new page.
The solution I created uses flowfilters which can be used in the table relation.
In the OnAfterGetRecord of the page I filter this flowfield
When using the default lookup, I now uses the flowfilters that I have placed