Advanced filtering with AND/OR condition

Case

An arbitrary object, say, an account, has parameter 1, parameter 2 and parameter 3. The object has a detail displaying records of this object type, e.g., accounts that meet the condition "parameter 1 + parameter 2 match the primary record", "parameter 2 + parameter 3 match the primary record", "parameter 1 + parameter 3 match the primary record". The detail enables filtering by several columns. How can I enable UNION, i.e., "summarize" several independent sets of such filters?

Solution

Use the filterGroup class for advanced filtering (you can implement filtering of any complexity).

You can see the case implementation in the AccountPageV2 schema (the UIv2 package) - the emailDetailFilter  filter.

Implement a custom method that contains "filterGroup" (e.g. "emailDetailFilter") and add this method to the entity.

filterGroup has "AND" condition by default. If you need to use "OR" condition, add the following property:

filterGroup.logicalOperation = Terrasoft.LogicalOperatorType.OR

You can find an example below:

Like 1

Like

Share

0 comments
Show all comments