Skip to main content

Hi,

I looked up some other topics but i still don't quiet get it. I have this column 

 

With a reference (look-up) like this 


But what i want is a filter on this reference. In fact this is the query i want

select etd.* from entity_type_document etd, document_type dt where etd.document_type_choice = 'letter' and etd.document_type_guid = dt.guid and dt.name = 'rental_indexing'

So the dropdown / lookup only show the results of the entity_type_document table where the document_type_choice is letter instead of all the data.

 

How do i achieve this?

Reference work by using the reference column (foreign key) relationship.

In your case it matches on

entity_type_document.guid = rental_index_method_bas_vw.index_entity_type_document_guid

If you want to expand on this filter you can use a (locked) prefilter in order to achieve that result, the prefilter could look something like this:

t1.document_type_choice = 'letter'

If you also need some-kind of filtering on document_type.name = ‘rental_indexing’, I think you need to look at the integrity / validity of your reference/lookup. You can’t just use any random field as a foreign key. The foreign key should consist of the primary key of the source table.


I ended up creating a view with that query. Then i created a lookup reference to that view to achieve what i want. I guess that's the easiest