Hi I have two arrays , one for the #MaterialCode and one for the #SerialNumbers

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

Parents
  • It looks like your helper rule has inputs material code, list of serial numbers, list of material codes. But you're passing it in as material code, list of material codes, list of serial numbers. Try switching the order of inputs to match, or use the input names in your function call e.g.
    apply(
    rule!formatMaterialCodeAndSerialNumbers(int_materialCode: _, text_listOfSerialNumbers: local!serialNumbers, int_listOfMaterialCodes: local!materialCodes),
    union(local!materialCodes,local!materialCodes)
    )
Reply
  • It looks like your helper rule has inputs material code, list of serial numbers, list of material codes. But you're passing it in as material code, list of material codes, list of serial numbers. Try switching the order of inputs to match, or use the input names in your function call e.g.
    apply(
    rule!formatMaterialCodeAndSerialNumbers(int_materialCode: _, text_listOfSerialNumbers: local!serialNumbers, int_listOfMaterialCodes: local!materialCodes),
    union(local!materialCodes,local!materialCodes)
    )
Children
No Data

 Discussion posts and replies are publicly visible