Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
11 subscribers
Views
4389 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
User Filter on multiple values
anjup
over 7 years ago
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
0
brettf
over 7 years ago
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!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
santhoshp523
over 7 years ago
create a rule as below
isReject = or(ri!status="e", ri!status="f")
a!queryFilter(
field: "status",
operator: "=",
value: reject(rule!isReject(_), ri!statusList)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kondetiv
over 7 years ago
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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel