Solved

Prefilter in a lookup table based on a value of the table containing the lookup column

  • 16 February 2022
  • 2 replies
  • 200 views

We have a view which contains a lookup column to another table. Whenever you edit a row in this view, the user is able to select a value from the lookup. This looks like follows:

Whenever we press this lookup, the user is able to select a cost record:

This works like intended. However, we would like to have a prefilter which filters the records on a vessel type which is selected on the parent table (in this case our parent table is so called calculation). See the image below:

So the idea is when this prefilter is ON, we want to filter all the cost records in this case on L-Class ice. Is it possible to collect this value and use this in our prefilter? 

 

For now we activated the search bar, to make the user manually fill in their vessel type. Thus, filter that way on their desired types for which they want to find cost records. This is not how we want it to work though. Using a prefilter would be way better to achieve this! Does anyone know if this is possible?

icon

Best answer by Anne Buit 17 February 2022, 08:59

View original

2 replies

Userlevel 7
Badge +5

Hi Marijn,

Is it possible to include the Vessel type in the view and use it as a preceding reference column mapping to open the Historic port passage costs look-up? The look-up will automatically be filtered.

If it is desirable to also be able to display records in the look-up that should not be automatically filtered, you can cross-join all vessel types in the  Historic port passage costs (or a view thereof) and map the look-up reference column to that cross-joined vessel type.

Then, you can enable a default prefilter that by default limits the set to the cross joined vessel type equal to the Historic port passage cost vessel type. This prefilter may then be disabled by the user to get access to all historic port passage costs.

It know this sound a bit abstract, so I hope this all makes sense. Reference column mapping is the best way to propagate information to a look-up.

Hi Anne,

We thought of this exact solution as well. Unfortunately, the 2 tables this concerns are quite large. And that is why we are a bit afraid of performance issues. So we hoped there was a better solution to achieve this. If there is no other way, we will try your solution and monitor the performance. Thanks for your reply Anne!

Reply