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 III
Super User III

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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (34,317)