how to iterate from list 1 & list 2 values at a time

Certified Associate Developer

Hello Everyone,

Can anyone help me on this, Thanks in Advance.

require to iterate from lists & save in cdt in above format.

  Discussion posts and replies are publicly visible

Parents
  • I am guessing both the list are going to be of same length and if thats the case then you can enumerate on any one the list and use the index function to get the value from second list as well.

    a!localVariables(
    local!list1: { "user1", "user2", "user3" },
    local!list2: { "userA", "userB", "userC" },
    a!forEach(
    items: local!list1,
    expression: a!map(
    contentOwner: fv!item,
    qcReviewer: index(local!list2, fv!index, null())
    )
    )
    )

Reply
  • I am guessing both the list are going to be of same length and if thats the case then you can enumerate on any one the list and use the index function to get the value from second list as well.

    a!localVariables(
    local!list1: { "user1", "user2", "user3" },
    local!list2: { "userA", "userB", "userC" },
    a!forEach(
    items: local!list1,
    expression: a!map(
    contentOwner: fv!item,
    qcReviewer: index(local!list2, fv!index, null())
    )
    )
    )

Children