How to get the output for two list of items separately in query rule

Certified Senior Developer

Hi 

In below query rule i am passing 2 and 3 product ids so it was returning both 2 and 3 product id's email id's but i want 2 product  id email ids in one list and 3 product id email ids separately means like two list of usernames separately could you please suggest on this 

  Discussion posts and replies are publicly visible

Parents
  • a!forEach(
      local!uniqueProductIds,
      a!map(
        productId: fv!item,
        emailIds: rule!getEmailIdsForProductId(id: fv!item)
      )
    )

    The above will result in a list of maps where each map contains the single product ID and any associated email IDs (you would need to fill in correct rule names/syntax/etc of course).  The phrasing in your original post is pretty confusing and lacking in punctuation but I did my best to parse what you're actually after, but apologies if this is off base.

Reply
  • a!forEach(
      local!uniqueProductIds,
      a!map(
        productId: fv!item,
        emailIds: rule!getEmailIdsForProductId(id: fv!item)
      )
    )

    The above will result in a list of maps where each map contains the single product ID and any associated email IDs (you would need to fill in correct rule names/syntax/etc of course).  The phrasing in your original post is pretty confusing and lacking in punctuation but I did my best to parse what you're actually after, but apologies if this is off base.

Children
No Data