I have been looking around the internet looking ways to filter a datasource FROM a lookup form, but ended getting results like "filtering another datasource USING a lookup form".
Instead, I am looking a solution to filter a lookup form considering the value of the calling form:
Specs below:
(1) My form has a datasource on a grid with two columns: Name and Media.
(2) Media is a referenced column.
(3) Media is a customized EDT set its property FormHelp to MediaLookupForm.


(4) MediaLookupForm is a standard lookup form (not a runtime lookup form) and has its own datasource.

(5) MediaLookupForm's datasource contains records both for a LOCAL item (ie LOC-0000789) & an EXPORT item (ie EXP-0000645).
If Name is a LOCAL item, records in the MediaLookupForm should only for LOCAL items.

If Name is an EXPORT item, records in the MediaLookupForm should only for EXPORT items.

(6) The parent table for Name has the field LOCAL/EXPORT enum.
(7) The parent table for Media has also the field LOCAL/EXPORT enum.
Question: How can I filter the datasource on MediaLookupForm considering the value on Name?
Links are highly appreciated!
Thank you so much!