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
18 replies
Subscribers
7 subscribers
Views
4936 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hello everybody, a question about expressions and arrays here. I have
Jin Pheh
Certified Associate Developer
over 9 years ago
Hello everybody, a question about expressions and arrays here.
I have a function that takes an array of users.
I have multiple arrays of users that I want to call my function on after applying a merge (ie: I want to call my function on the first element of each array, then the second of each array, etc etc). However the apply function treats the result of a merge as individual arguments instead of a single array object when calling my expression. Wrapping the _ placeholder in the apply function with curly brackets causes a syntax error as does casting the result of the merge to a user list.
Has anyone dealt with this before and if so how did you resolve it?
OriginalPostID-138030
OriginalPostID-138030
Discussion posts and replies are publicly visible
Parents
0
Mike Schmitt
Certified Lead Developer
over 9 years ago
Yes, you do need to pass the whole object down through the evaluating expression, but as I mentioned before, you can utilize property() to handle multiple different types of CDT in one expression (instead of one separate sub-rule for each different type).
As far as apply() goes, in my experience it's a bit finnicky in what it accepts. For instance it'll accept the larger chunks of a list created by merge(), but it doesn't seem to like handling array-of-arrays in any other way (that i've tried).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Mike Schmitt
Certified Lead Developer
over 9 years ago
Yes, you do need to pass the whole object down through the evaluating expression, but as I mentioned before, you can utilize property() to handle multiple different types of CDT in one expression (instead of one separate sub-rule for each different type).
As far as apply() goes, in my experience it's a bit finnicky in what it accepts. For instance it'll accept the larger chunks of a list created by merge(), but it doesn't seem to like handling array-of-arrays in any other way (that i've tried).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data