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
7 subscribers
Views
1942 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi I have two arrays , one for the #MaterialCode and one for the #SerialNumbers
danielem
over 8 years ago
Hi I have two arrays , one for the #MaterialCode and one for the #SerialNumbers
Arrays are alrady sorted.
what I need to obtain is an array of [#MaterialCode,#ListofSerialNumber] list of serial Numbers for each #MaterialCode
Example:
#MaterialCode : {083813291400, 083813291400, 083813291400, 083816316600, 083816316600}
#SerialNumbers: {BB, DD, EE, XX, YY}
Desire Output should be:
{
{083813291400,"BB,DD,EE"},
{083816316600, "XX , YY"}
}
Thank you in advanced
OriginalPostID-153181
OriginalPostID-153181
Discussion posts and replies are publicly visible
Parents
0
mmukofsky
over 8 years ago
Does the use case allow for this to be done in process? If so, I would use one script task to determine the distinct material codes (rule!APN_distinct) and then in the next node you can MNI over that list of distinct materical codes. I used the following expression in the data output of the MNI node appending to my array on each iteration:
append(pv!distinctMaterialCodes[tp!instanceindex],index(pv!serialNumbers,wherecontains(pv!distinctMaterialCodes[tp!instanceindex],pv!materialCodes),{}))
Attached a screenshot of the resulting variables. It's not complete, but maybe will put you in the right direction.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
mmukofsky
over 8 years ago
Does the use case allow for this to be done in process? If so, I would use one script task to determine the distinct material codes (rule!APN_distinct) and then in the next node you can MNI over that list of distinct materical codes. I used the following expression in the data output of the MNI node appending to my array on each iteration:
append(pv!distinctMaterialCodes[tp!instanceindex],index(pv!serialNumbers,wherecontains(pv!distinctMaterialCodes[tp!instanceindex],pv!materialCodes),{}))
Attached a screenshot of the resulting variables. It's not complete, but maybe will put you in the right direction.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data