Kattte
Kattte

Reputation: 29

How to enter only values of array into file in power automate

I'm sending three variables into my power automate flow, all arrays. I'm individually putting each one into its own Create CSV table component and their output is similar to this format:

[ { "AMDTitle": "AMDrive", "MiddayTitle": "Midday", "EveningTitle": "Evenings" } ]

Then I add all three Create CSV table outputs to a Sharepoint Create file component to make a csv file. The flow overall is doing what I want but it's putting even the keys into a row in the file like this:

row 1: AMDTitle MiddayTitle EveningTitle row 2: AMDrive Midday Evenings

How can I get the array values only (row 2) and not both the key and values in the file?

Upvotes: 0

Views: 1812

Answers (2)

Sumit
Sumit

Reputation: 1126

You need to do the following changes to your Create CSV Table:

  • Change the Columns type from Automatic to Custom
  • Then for each column you only need to specify the value, you don't need to specify the column header. E.g. if your column name is Title 2 then you can get the value by using this formula: item()['Title 2']

Following is an example: enter image description here

This will generate your desired output, i.e. without header, only values: enter image description here

Upvotes: 0

Farkas János
Farkas János

Reputation: 196

can you double check it, please? I recreated your flow (if I got it not wrong), but the outcome is working as expected.

enter image description here

update: "Create CSV table action" with custom headers: enter image description here

Upvotes: 0

Related Questions