cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
conums
Regular Visitor

Parse data table with choice fields using JSON function to send table to Power Automate

I'm trying to send a data table in PowerApps to a flow in Power Automate when a button in the app is clicked. This works when I have this in the OnSelect for the Button:

 

 

Set(sendtoFlow, Filter('Sharepoint list', Conditions));
Set(varFormattedJSON, JSON(SendtoFlow, IncludeBinaryData));
ExporttoCSV.Run(varFormattedJSON)  

 

 

However, in the CSV file that gets generated from the flow, I get a lot of unnecessary columns that I guess comes from the properties columns of the Sharepoint list. Is there a way to send over the datatable in its current state to Power Automate using JSON? I've tried to create a collection of the datatable to send:

 

 

ClearCollect(colTable, DataTable6);
Set(sendtoForm, colTable);
Set(varFormattedJSON, JSON(sendtoForm, IncludeBinaryData));
ExporttoCSV.Run(varFormattedJSON)

 

 

However, I get an error in the ClearCollect that it expected a record or table value.

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @conums ,'

Is there a reason you want to use JSON here? You can simply use Concat() on the columns you need.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Can I see an example of this?

 

I'm using JSON because I'm parsing the JSON string of the table in a flow. JSON is just what I've seen others use.

 

I've edited my post; I may have used JSON in the wrong place initially. 

Hi @conums ,

Here is a good video from Dan Christian, but basically the structure is 

Heading1 & "," & Heading2 & "," & Heading3 & "," & Heading4 & Char(10) & 
Concat(
   List/CollectionName,
   Field1 & "," & Field2 & "," & Field3 & "," & Field4 & Char(10)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

WarrenBelz
Super User
Super User

Hi @conums ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,856)