Open

Or prefilters

  • 26 August 2019
  • 7 replies
  • 148 views

Userlevel 4
Badge +2
Selecting multiple prefilters now always leads to: where [prefilter 1 query] AND [prefilter 2 query]. I would also very much like to have the possibility to make OR prefilters.

7 replies

Userlevel 5
Badge +10
I want this feature for many years. I see some security challenges, but when these can be solved, it would be great.
Userlevel 5
Badge +10
I second that Harm! Also wanted this feature already for 3 years. Hope it gets implemented in a safe way.
Userlevel 4
Badge +1
I think making such a thing safe is not something that can be enforced trough the Software Factory.
You could require locked prefilters to be always true and then, on top of that, have one or multiple 'or-prefilters'. It would generate a query like this:

code:
select some_values
from some_table t1
where locked_prefilter = 'true'
and ( first_or_prefilter = 'true'
or second_or_prefilter = 'true'
);


But it is the responsibility of the developer to make sure that the 'or-prefilters' will not result in situations that show too much data.
Userlevel 4
Badge +2
As far as security goes, I agree with Robert Jan's solution that locked/hidden prefilters should always be applied to the query and can only be combined with an AND-operator.

Another challenge is how to indicate that multiple active prefilters need to be combined with an OR- or AND-operator. Should this be determined by the user? For instance by being able to group multiple non-locked prefilters as 'or-prefilters'. Or should 'or-prefilters' always be predetermined, logical groups? In which case we could simply add an 'operator' field to prefilter groups in the SF.
Userlevel 4
Badge +1
I think AND/OR concepts are hard enough for a user, so I'd suggest have them 'fixed' in a predetermined group.

Could we combine this with a 'mandatory' property for a prefilter-group? Always have at least one prefilter from within a group active?
Userlevel 4
Badge +5
I totally support this idea. Most of the Prefilters I set up based on a Query are required due to lack of the support of an OR function.
Userlevel 5
Badge +2
Could we combine this with a 'mandatory' property for a prefilter-group? Always have at least one prefilter from within a group active?

Mandatory exclusive prefilter groups will be available in 2019.2. The release should be available for download next week.

Reply