Count the list of array

{1,2,3}, {56,76,54,32}, {12,23,45,54,32,54}, {1,2,3,4,5,6,7}, {8,9,10,11,12,13,14,15}

Please suggest how do this using foreach function get output like this, 

  • "length of array 1 is 3"
  • "length of array 2 is 4"
    • "length of array 3 is 6"
      • "length of array 4 is 7"
        • "length of array 5 is 8"

          Discussion posts and replies are publicly visible

        Parents
        • 0
          Certified Senior Developer

          a!localVariables(
          local!data: {
          a!map(list: {1,2,3,8,9,9,9,9,9,80,90,70}),
          a!map(list: {56,76,54,32}),
          a!map(list: {12,23,45,54,32,54}),
          a!map(list: {1,2,3,4,5,6,7}),
          a!map(list: {8,9,10,11,12,13,14,15})
          },

          a!richTextDisplayField(
          value: a!richTextBulletedList(
          items: a!forEach(
          items: local!data,
          expression: a!richTextListItem(
          text: concat(
          "length of array ",
          fv!index,
          " is ",
          count(fv!item.list)
          )
          )
          )
          )
          )
          )

        • a!localVariables(
          local!data: {
          a!map(list: {1,2,3,8,9,9,9,9,9,80,90,70}),
          a!map(list: {56,76,54,32}),
          a!map(list: {12,23,45,54,32,54}),
          a!map(list: {1,2,3,4,5,6,7}),
          a!map(list: {8,9,10,11,12,13,14,15})
          },

          a!richTextDisplayField(
          value: a!richTextBulletedList(
          items: a!forEach(
          items: local!data,
          expression: a!richTextListItem(
          text: concat(
          "length of array ",
          fv!index,
          " is ",
          count(fv!item.list)
          )
          )
          )
          )
          )
          )

          When re-posting solutions from earlier in the thread, please use Insert -> Code Wink

        Reply
        • a!localVariables(
          local!data: {
          a!map(list: {1,2,3,8,9,9,9,9,9,80,90,70}),
          a!map(list: {56,76,54,32}),
          a!map(list: {12,23,45,54,32,54}),
          a!map(list: {1,2,3,4,5,6,7}),
          a!map(list: {8,9,10,11,12,13,14,15})
          },

          a!richTextDisplayField(
          value: a!richTextBulletedList(
          items: a!forEach(
          items: local!data,
          expression: a!richTextListItem(
          text: concat(
          "length of array ",
          fv!index,
          " is ",
          count(fv!item.list)
          )
          )
          )
          )
          )
          )

          When re-posting solutions from earlier in the thread, please use Insert -> Code Wink

        Children
        No Data