Skip to main content
Solved

Filtered look-up

  • August 12, 2024
  • 2 replies
  • 75 views

Forum|alt.badge.img+2

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?

Best answer by Dennis Kallansee

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

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

2 replies

Robert Jan de Nie
Thinkwise blogger
Forum|alt.badge.img+5

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.


Forum|alt.badge.img+2

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings