|
Los tipos de archivo clásicos dejarán de estar disponibles a partir de enero de 2021. Puedes migrar tus archivos clásicos o descargar un PDF. Más información

Array to CSV issue

1

Comentarios

2 comentarios

  • Brooke Mortvedt

    Hi Rajesh Shrestha - Thanks for contacting us regarding your issue! To determine the issue, we recommend reaching out to your CSM so they can grab some more information & assist. 

    Have a great day!

    0
  • Jeff Hickey

    Hi Rajesh Shrestha,

    I recommend using the Handlebars Connector to build your output from the JSON. If you haven't used Handlebars before, we have quite a few resources below to help.

    Using the following sample JSON:

    {
      "pov": [],
      "columns": [
        [
          "Q1",
          "Q2",
          "Q3",
          "Q4"
        ]
      ],
      "rows": [
        {
          "headers": [
            "FCCS_Net Income",
            "BU_XXXXX",
            "FY25",
            "AN2222",
            "Actual",
            "Final",
            "Total Project",
            "Total Product",
            "YTD",
            "Consolidation",
            "Total Data Source",
            "Total Function",
            "Color",
            "Intercompany",
            "Total Geography",
            "Movement"
          ],
          "data": [
            "255555",
            "22222",
            "55555",
            "68942"
          ]
        }
      ]
    }

    You can make use of the Render Text Template command with the following example template to output a comma separated result.

    "headers","data"
    {{#each json.rows}}
    "{{#each headers}}{{this}}{{#unless @last}},{{/unless}}{{/each}}","{{#each data}}{{this}}{{#unless @last}},{{/unless}}{{/each}}"
    {{/each}}

    With the above example template, the output will be:

    "headers","data"
    "FCCS_Net Income,BU_XXXXX,FY25,AN2222,Actual,Final,Total Project,Total Product,YTD,Consolidation,Total Data Source,Total Function,Color,Intercompany,Total Geography,Movement","255555,22222,55555,68942"

    Thanks,
    Jeff

    0

Iniciar sesión para dejar un comentario.