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
8 subscribers
Views
2862 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Has anyone else noticed a change in how the wherecontains function works? S
Jin Pheh
Certified Associate Developer
over 10 years ago
Has anyone else noticed a change in how the wherecontains function works?
Specifically if I am searching for repeated values the wherecontains now removes duplicates from the results where it used not to.
Eg:
wherecontains({a, b, a}, {a, b, c})
I expect this to return [1, 2, 1] however it now returns [1, 2].
If this is the desired behavior does anyone know how I might get the first result (IE: [1, 2, 1]) short of using an apply function? (I'm manipulating large arrays and I'd prefer to use a set function instead of an iterative one)...
OriginalPostID-128856
OriginalPostID-128856
Discussion posts and replies are publicly visible
Parents
0
Jin Pheh
Certified Associate Developer
over 10 years ago
Very interesting - That goes against my experience as I've used it extensively in 6.5, 6.6 and 6.7 and it's never removed duplicate results from the result set before.
My use case is that I have a large list of Id's and I need to get a corresponding object for each ID. Because there are only ~30 objects and they live in the database I wanted to use the wherecontains and index function to transpose the ids into the objects via:
index(objectArray, wherecontains(keyList, objectArray.Id), null())
I've used this successfully in many situations and have even created an expression rule to use this recipe in shorthand.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Jin Pheh
Certified Associate Developer
over 10 years ago
Very interesting - That goes against my experience as I've used it extensively in 6.5, 6.6 and 6.7 and it's never removed duplicate results from the result set before.
My use case is that I have a large list of Id's and I need to get a corresponding object for each ID. Because there are only ~30 objects and they live in the database I wanted to use the wherecontains and index function to transpose the ids into the objects via:
index(objectArray, wherecontains(keyList, objectArray.Id), null())
I've used this successfully in many situations and have even created an expression rule to use this recipe in shorthand.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data