Skip to main content
Hi,



We have a situation where a 'suggestion-contains' control has a lookup with a couple of prefilters. Now when one of the prefilters is active, the lookup (with the pop-up closed) still only shows items within the prefilter. This feels a bit counter-intuitive, because every time I want an item belonging to another prefilter, I need to open the pop-up and change the prefilters.



Is there something I can do to reset the filters every time the pop-up is closed?



Thanks.
Hello Rony,



Thank you for your question.



First thing that comes to mind is; why are there prefilters in the lookup? If you need to swap them so many times the purpose of the lookup is not correct.



If there is too many data available with all prefilters off, maybe it is possible to create a view that contains all the necessary data without the prefilters.



Resetting the prefilters on closing the lookup sounds like a bad idea. It's counterintuitive to see your filtered data is gone the next time you open up the lookup.



If you feel like I misunderstood your problem or if you have any further questions then please let me know.



Kind Regards,

Roel
Thanks for your response.



I have to say I wholeheartedly disagree.



Let me explain my vision on how the suggestion-contains lookup-control works.

Situation 1: When a user knows exactly what he wants, he can type directly in the grid and automatically get the item he wants (this can be any of the items from the lookup).

Situation 2: The user does not exactly know what he wants, he opens the pop-up of the lookup, there he can use prefilters to help him find the item he needs. When he has found the item he wants, he selects it and goes back to the grid. Next time he wants to enter an item it should in no way be affected by his previous (search) action.



Let's think of a silly example: Let's say you're in a grid where you have to assign a person to a task. Now lets say you have a lookup with a prefilter for male/female. You want to assign a person and can't quite remember the name of the person, but you do know it's a woman, you prefilter for women and find the right person. You now close the lookup, finish the line and get to the next one, here you certainly know the name of the person (it's a male), so you type in the name and expect he lookup to give you the person in question... but it doesn't because the filter was still set to women.



I hope you can see that I completely disagree with you that my way is counter-intuitive. And actually I strongly feel your (/the current) way is counter-intuitive.
Hi Pim,



I see your point and I agree with what you have written, but that's not the full scope of the problem. You are only considering the scenario in which someone turns a prefilter on, which causes the data set of the lookup to become smaller. It is quite easy to reverse your argument when we consider someone turning a default prefilter off, to make the data set of the lookup larger.



Let's once again say that you have to assign people to tasks. You are normally in charge of doing this for the people in department A, so there's a prefilter for department A which is active by default. However, your colleague is on vacation, so today you need to assign people from department B to tasks. You open the lookup, you turn off the prefilter, you select a person ...and the prefilter is back on. Not only does the person that you have just selected drop out of your current lookup set immediately upon selecting him/her, the next person that you will be looking for will require you to turn off the prefilter again.



I'm not implying that this problem is more relevant than yours, I just want to show you that your argument goes both ways. Perhaps the problem is not persisting the state of the prefilters, but rather the difficulty of seeing which prefilters are on/off and changing their state.
Hey Vincent,



Thanks for your reply, this indeed is a valid situation as well.



I think we agree that the prefilters shouldn't just reset whenever the pop-up is closed. But I think the solution is that typing in the grid should not be influenced by the prefilters at all (except for locked prefilters of course). This means that when the user knows the value he needs, he can type it and get the value no matter what. If the user is unsure he can open the pop-up and change the filters to his needs (whether they were reset or not).



Now I can see a situation where user thinks he knows what he needs and enters a value that does not fit with the prefilter he would have chosen.. But then the question is whether the prefilters are meant to help the user find an item or whether they are there to safeguard him from making mistakes. Although this could for example be solved quite easily by adding a small icon to the gridcell telling the user the autocompleted value does not comply with the set prefilters.
Hi Pim,



I agree that when someone knows what they are looking for and the value they have entered is specific enough, then it would be ideal for this value to be the only filter applied to the lookup set (aside from authorization prefilters). Although even in these ideal circumstances I can still think of scenarios in which it would be better for at least some prefilters to remain active. For instance when dealing with records that have identical or nearly identical display values, but one is marked 'active' and the other is not.



With that said, there are also scenarios in which the user doesn't know exactly what to enter, perhaps they only know the first letter. In this scenario, turning off the prefilters would increase the likelihood of that person not finding the correct result.



In general, prefilters that are on by default will rarely need to be turned off, otherwise it's bad design. So perhaps we could say that when typing in a value, only the prefilters that are on by default are applied, except for those that have been turned off explicitly by the user. This would at least solve both of the use cases that we have described simultaneously. In addition, it would be nice to see which prefilters are active and change their state more easily.



How do you feel about that solution?
Hey Vincent,



I think your proposed solution will work better on the possible situations than the current solution does.

Probably we will have some work to set the prefilters to fit this new situation, but after that I believe our issue will be solved.



Thanks for thinking with me 😃
Hi guys,



I must say that I still disagree with the conclusions that are drawn in this topic.

When I read this I figured let's test this out and I came up with two conclusions.




  • First, the lookup and the prefilter state reacts differently when you actually select something or don't. If I am changing or adding a value, I need to select a record and then the prefilter state is being saved and opened in exactly the same way as it was when the record was selected, but if I just am viewing the look-up and change the prefilters in the progress then the prefilters are reset as soon as I am closing the look-up. This feels to me like inconsistent behaviour.


  • Second, to use the example of Pim, when I am looking for a person and I have a prefilter to filter for Men or for Women then I find that the display of the values are also affected by the contents of the look-up with respect to their current prefilter state. So I have a list of names of which a few are men and I just added a record with a woman's name and I used that prefilter to search for her. Now when I am browsing the other records I don't see any of the men's names. This too me is very wrong, because suddenly correct data isn't displayed correctly anymore. Regardless of the prefilter state I should always see the name of the person that was entered.

Example: https://

In the above example I have entered an objecttype Installatie and I cannot see the name anymore, because the prefilter has dropped that record from the look-up. For the record I am not editing this record, but just viewing it.
Sorry,



I see that my example didn't work. Let's try it again: