Indexing to Lis of text String

Hi All,

I am trying to use indexing for type " List of Text String " but the output i am getting not the expected output i am adding the screenshots here for reference.

Thanks In advance,

SSP

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Can you share your code? I am sure I understand what you do and what your goal is.

  • Hi Stefan,
    Here is my code.

    a!localVariables(
      local!exceldata: readexcelsheet(
        excelDocument: cons!IT_SAMPLE_FILE,
        sheetNumber: 0,
        startRow: 0,
        /*stopReadingAtFirstBlankRow: false(),*/
        /*pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 0)*/
        
      ),
      local!datalength: length(
        index(local!exceldata, "result", "values", {})
      ),
      local!headers: index(local!exceldata, "result", "values", 1, {}),
      local!filecdt: a!forEach(
        items: local!headers[1],
        expression: {
          fv!item & " : " & a!forEach(
            items: 2,
            /*enumerate(local!datalength - 1) + 2,*/
            expression: a!forEach(
              items: index(
                local!exceldata,
                "result",
                "values",
                fv!item,
                {}
              ),
              expression: a!forEach(
                items: fv!item,
                expression: a!forEach(
                  items: fv!item,
                  expression: fv!item
                )
              )
            )
          )
        }
      ),
      local!filecdt
    )

Reply
  • Hi Stefan,
    Here is my code.

    a!localVariables(
      local!exceldata: readexcelsheet(
        excelDocument: cons!IT_SAMPLE_FILE,
        sheetNumber: 0,
        startRow: 0,
        /*stopReadingAtFirstBlankRow: false(),*/
        /*pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 0)*/
        
      ),
      local!datalength: length(
        index(local!exceldata, "result", "values", {})
      ),
      local!headers: index(local!exceldata, "result", "values", 1, {}),
      local!filecdt: a!forEach(
        items: local!headers[1],
        expression: {
          fv!item & " : " & a!forEach(
            items: 2,
            /*enumerate(local!datalength - 1) + 2,*/
            expression: a!forEach(
              items: index(
                local!exceldata,
                "result",
                "values",
                fv!item,
                {}
              ),
              expression: a!forEach(
                items: fv!item,
                expression: a!forEach(
                  items: fv!item,
                  expression: fv!item
                )
              )
            )
          )
        }
      ),
      local!filecdt
    )

Children