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
4 replies
Subscribers
7 subscribers
Views
1322 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I have a local!data merged from 7 arrays, the local!data output is like
shaoyongw
over 9 years ago
I have a local!data merged from 7 arrays, the local!data output is like
CAtest: Main Contract Review, [Group:2397], 5/25/2015 4:40 AM EDT, , , 0, , CAtest: Main Contract Review, [Group:2390], 5/25/2015 4:40 AM EDT, , , 0, , CAtest: Main Contract Review, [Group:2399], 5/25/2015 4:40 AM EDT, , , 0, , CAtest: Main Contract Review, [Group:2398], 5/25/2015 4:40 AM EDT, , , 0,
apply(fn!count, local!data) returns : 7, 7, 7, 7
apply(fn!length, local!data) returns : A null parameter has been passed.
apply(rule!otherRule, local!data) returns : Rule 'otherRule' has 1 parameters, but instead passed 7 parameters.
OriginalPostID-150739
OriginalPostID-150739
Discussion posts and replies are publicly visible
0
shaoyongw
over 9 years ago
any idea why?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shivakanthr
over 9 years ago
what output you are expecting ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 9 years ago
Well merge creates an array of arrays. So with 4 items in one of the unmerged arrays, you're going to get 4 sets of a 7-item list. This is went count is returning 7,7,7,7.
Your other rule only has one parameter, but when you do the merge you're trying to send in 7 parameters, hence that last issue.
For the length error I'm guessing there's an index in local!data with all nulls.
What exactly are you looking for?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 9 years ago
The local!data was expected to be an array of arrays. It is working in fn!count but not working in fn!length.It seems weird because none of the arrays in local!data contains all nulls.
And when I using otherRule the array in local!data is recognized as 7 parameters but not as one array. This is why I post this question.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel