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
5 replies
Subscribers
11 subscribers
Views
2988 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
In the a!queryFilter(), we have a "field" property. It works when the
chetany
A Score Level 1
over 9 years ago
In the a!queryFilter(), we have a "field" property. It works when the field in the CDT is single. I am getting an error which suggests that if the field is multiple then a!queryFilter() cannot be used.
The error is: "Cannot filter by field [allowed_users] because it is a complex, multiple, or child of a multiple data type. (APNX-1-4203-020)"
Also, I have used the operator "includes". I just want to apply a filter to check if the "allowed_users"(which is multiple ) contains loggedInUser(). My understanding was that this will filter only those records which have "allowed_users" containing the loggedInUser()?
I think I am wrong about this usage. Please let me know how I can apply a!queryFilter() in this scenario.
OriginalPostID-147431
OriginalPostID-147431
Discussion posts and replies are publicly visible
0
Mike Schmitt
Certified Lead Developer
over 9 years ago
It's hard to provide more info without knowing more about how your data is configured... so first: where are you using hte queryFilter - in a queryRecord or queryEntity?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 9 years ago
Hi mschmitt, My record is service backed(let's assume it is called Employees) . I want to apply a default filter on it. I will use the a!queryFilter in a!queryEntity.
The data in each datasubset is something like this: [ [id1, field1, list_of_usernames1], [id2, field2, list_of_usernames2]] . I have maintained a "list_of_usernames"(an array) which contains usernames. Now, when a user navigates to the 'Employees' record type in the tempo, he should be able to see only those records for which his name appears in "list_of_usernames". The records in which his username does not appear in "list_of_usernames" should not be shown.
Let me know if this is possible.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 9 years ago
I'm under the impression (though I could be remembering wrong) that the "INCLUDES" operator is meant to filter by a text field [singular] that includes the passed-in text at some point.
The functionality you're after seems like you might want to try "IN", which compares across mulitples; however I'm unsure whether it'll act the way you want when the field referenced is a multiple. I suggest you test it out in a new Expression Editor window and see what happens.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 9 years ago
Thank you, I will try it out
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mpontius
over 9 years ago
Any luck with this? I am trying to use the IN operator in the same manner and still am unable to get it to work.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel