cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jamesmatson
Level: Powered On

Convert PowerApps Table into a string, or array, or json to pass to Flow

I have a table in my PowerApps app. I want to get the table data into Flow to work with. Once the data is in flow I know I can do all the things I need, but how to get the entire table into flow in teh first place? I could get an invidiaual value from the table in no problems, but what about passing the WHOLE table in? 

2 REPLIES 2
jamesmatson
Level: Powered On

Re: Convert PowerApps Table into a string, or array, or json to pass to Flow

Any ideas? 

jamiewr
Level 8

Re: Convert PowerApps Table into a string, or array, or json to pass to Flow

I've had some luck using a combination of Concat, Concatenate and Substitute to create a valid JSON object that can be parsed by Flow.

 

Here's an example:

Substitute(
    Concatenate(
      "[",
       Concat(tableSource,"{""FieldName"":""" & FieldName & """,""FieldName2"":""" & FieldName2 & ""},"),
       "]"
      ),
     ",]",
     "]"
)
================
In my example I used Concat to join all the fields (FieldName and FieldName2) for all rows in the tableSource.
I wrapped the entire string in "[" and "]" using Concatenate.
Then I used Substitute to remove the last comma

Click for more on Concat and Concatenate.