User Filter on multiple values

I have a requirement to filter entity backed record using Static User Filter.
Scenario: List of status: {"a","b","c","d","e","f"}. I have to exclude "e" & "f" by using single static filter. I tried using "<>" operator ,but it was not working .Is there any way I can achieve it.

Thanks in advance

OriginalPostID-239899

  Discussion posts and replies are publicly visible

  • To get around this use-case, you can use the expression option for user filters. Set the user filter as an expression, and as the definition, you can use the expression a!facet. The fields are name (the display name of the facet), options (the options of the facet), defaultOption (label of the default option), and isVisible (if the user can see the facet).

    Under options, you define an array of a!facetOption(). The fields are id (the unique identifier for the facet option, just make sure each is unique), name (the label of the facet option that is displayed), and filter.

    The filter field is what is needed, as it takes in an a!queryFilter expression. You can select the field, give it the operator of "not in", and set the value to the values you wish that filter to exclude. For your example, you could do the following:

    a!queryFilter(
    field: "status",
    operator: "not in",
    value: {"e","f"})

    Hope this helps!
  • create a rule as below
    isReject = or(ri!status="e", ri!status="f")


    a!queryFilter(
    field: "status",
    operator: "=",
    value: reject(rule!isReject(_), ri!statusList)
    )


  • Writing code for static user filters directly in record type properties may not work. As @santhoshp523 said, create a rule and call that rule in record type properties. It would work.