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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,314)