cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

Passing the PowerApps Collection to MS Flow

I was actually looking for a way to pass the entire collection that was there in the PowerApps to the MS Follow for subsequent action to be taken based on data at each row of the collection.

 

There is no direct way to achieve it at this point of time.

Doing a forall & concatenate seemed slow and complicated respectively.

 

I found an easy way to achieve the above. 

 

Here's what I did : 

  1. Converted the collection to the JSON
    • Set(JSONName, JSON(CollectionName ))
    • The collection was now formatted to JSON and got stored in the variable JSONName
  2. Created a flow which parses the JSON which is gets passed from the PowerApps
    Powerapps_FLowcollection.png
  3. From PowerApps you can pass the JSON Formatted Collection (JSONName)
    Flowname.Run(JSONName)

 

Now you can manipulate collection data at the flow end like anyother JSON data. 

 

Note/Tip & Trick :

For the schema of the JSON that needs to be provided at the flow end in the Parse JSON step.

You can set the text value of label as the Json Variable(JSONName). Copy paste the content of the label  in the Parse JSON flow step.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @svijay_001 ,

Thanks for your sharing!

The new function of JSON is quite useful.

Here's a doc about how to use json:

https://powerapps.microsoft.com/en-us/blog/json-for-canvas-apps/

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Super User III
Super User III

@svijay_001 

Two thumbs up for the new JSON function!!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Community Support
Community Support

Hi @svijay_001 ,

Thanks for your sharing!

The new function of JSON is quite useful.

Here's a doc about how to use json:

https://powerapps.microsoft.com/en-us/blog/json-for-canvas-apps/

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Frequent Visitor

Hey!

Is there any way you could post more on what you have in the schema and the contents of your collection? I'm working on adding the same type of functionality, but when I display the variable it gives me a hard coded response on what is in the collection. My app is intended to act as a form that will be sent to sql server, so the inputs are going to vary. I'm wondering how I would call the values if they're going to be changing.

 

Thanks!

I did not understand your questions ? Can you please elaborate ? 

 

Thank you for the post, it really helped!  We found out that embedding the JSON format directly into the Flow Param works as well (just in case you don't want to have to initiate another variable).


'SampleFlow'.Run(JSON(colSampleCollection, JSONFormat.IgnoreBinaryData))

@dcoxi21, the following schema should allow you to parse the JSON input with keeping the flexibility on the properties:

 

{
  "type""array",
  "items": {
    "type""object"
  }
}

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (6,107)