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
1 reply
Subscribers
10 subscribers
Views
3446 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
a!queryFilter by multiple fields
brandonc5321
over 7 years ago
#Records
Hi everyone,
I'm trying to create a filter on my Records list that filters down records I have touched. e.g. A record that my username exists in the "createdBy" field OR the "modifiedBy" field.
Currently I have two a!facetOption, one that filters the loggedinuser() by createdBy and one that looks at modified by.
My goal is to create a single filter option instead of two, called My Records, that will look at either column and return the union of those records.
The reason why I do not want to filter on just modifiedBy is that if another user modifies the record, it will disappear from the list.
The requirement is that the user sees a filtered list of any record that they have participated in creating/editing in the past.
How do I do this with my current 1 table structure with two columns createdBy & modifiedBy?
Attached is the current a!facet I am using.
OriginalPostID-266069
Discussion posts and replies are publicly visible
Parents
0
marcoc918
A Score Level 1
over 7 years ago
I think you can use this workaround:
-create a rule called rule!filter with a ri!field like this:
a!queryFilter(
field: ri!filter
operator "="
value: loggedinuser()
-on the record create a multiple text ri!fields with value "createdBy"; "modifiedBy" and after use this code:
a!facet(
name: "My Records,
options: {
id: 1,
name: "My records"
filter: apply(
rule!filter,
ri!fields
)
},
isVisible: true
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
marcoc918
A Score Level 1
over 7 years ago
I think you can use this workaround:
-create a rule called rule!filter with a ri!field like this:
a!queryFilter(
field: ri!filter
operator "="
value: loggedinuser()
-on the record create a multiple text ri!fields with value "createdBy"; "modifiedBy" and after use this code:
a!facet(
name: "My Records,
options: {
id: 1,
name: "My records"
filter: apply(
rule!filter,
ri!fields
)
},
isVisible: true
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data