Can we add two or more filters in facetOption

Can we add two or more filters in facetOption? if not, is there any workaround solution?

a!facet(
name : "Status",
options : {
a!facetOption(
id : 1,
name : "Active",
          
filter : {
a!queryFilter(
field:"StartDate",
operator:"<=",
value: today()
),
a!queryFilter(
field:"EndDate",
operator:">=",
value: today()
)
}
)
},
defaultOption: "Active"
)

OriginalPostID-240150

  Discussion posts and replies are publicly visible

Parents
  • @ramakg Following are the options for you as per my knowledge:

    1. Try using the 'between' operator.
    2. Add a column in database view(if you are using a table, switch to view as you may not want to alter a table for adding a filter) on which the Record Type is sourced. The new column should do the necessary evaluation in the database and return a single value(may be a boolean value) finally which can be configurable via query filter.
    3. If you are using the Entity Backed record, convert it into Expression Backed record and drive the results based on rsp!query. This is a bit time consuming but I can say that this facilitates the kind of requirements you discussed much easily.

    Given a chance, I will prefer the third one. And if there are time constraints, my option will be 1 and then 2 (if option 1 fails).
Reply
  • @ramakg Following are the options for you as per my knowledge:

    1. Try using the 'between' operator.
    2. Add a column in database view(if you are using a table, switch to view as you may not want to alter a table for adding a filter) on which the Record Type is sourced. The new column should do the necessary evaluation in the database and return a single value(may be a boolean value) finally which can be configurable via query filter.
    3. If you are using the Entity Backed record, convert it into Expression Backed record and drive the results based on rsp!query. This is a bit time consuming but I can say that this facilitates the kind of requirements you discussed much easily.

    Given a chance, I will prefer the third one. And if there are time constraints, my option will be 1 and then 2 (if option 1 fails).
Children
No Data