cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ddf
Helper I
Helper I

Populating a gallery with a filtered sharepoint document library using flow

I need to populate a gallery with a collection of file properties filtered by a sharepoint document list using Flow.

I designed this sequence of flow steps:

  • Power apps button trigger
  • "Initialize variable", with the text inserted in a textbox
  • "Get SP files (only properties)"
  • "Array filter" to select only files that contain the search variable in the filename
  • "Respond to Powerapps"

Cattura.JPG

detail:

 

Cattura.JPG

 

I don't be able to export the filtered data to my collection (and fill my gallery items).

I tried to use "Respond to Powerapps" but I don't see the variable to link to "result".

 

Cattura.JPG

I found this problem with array variables and not with the string ones.

Please help me. Thank you in advance.

Daniele

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
JohnAageAnderse
Memorable Member
Memorable Member

Hello @ddf 

To transfer the result from the Filter Array action back to the PowerApps, you have to convert it into a format that can be sent back.

Then your PowerApps has to parse the data into a useful format 🙂

Kind regards, John

View solution in original post

3 REPLIES 3
JohnAageAnderse
Memorable Member
Memorable Member

Hello @ddf 

To transfer the result from the Filter Array action back to the PowerApps, you have to convert it into a format that can be sent back.

Then your PowerApps has to parse the data into a useful format 🙂

Kind regards, John

Thank you John.
I made an upgrade to this post adding the join function but I still have a problem to obtain a result.
Please look this new post if you can help me.
Thanks again
Daniele
https://powerusers.microsoft.com/t5/Building-Power-Apps/Get-file-property-from-a-share-point-documen...

Hello @ddf 

The possible response formats does not allow you to pass back an array, so you have to JSON.stringify it first, then pass that back in the text response field.

In my flow I have received an array of items, which I then stringify (like with JSON) and pass the result into the response field "result".

ResponseToPowerAppsJSONStringify.png

In you PowerApps, when I invoke the flow, I set a variable to hold the response.

PowerAppsSetResultInVariable.png

The variable is then used to fill my label with the result, which of course is still a stringified JSON.

 

ResultInLabelTextFromVariable.png

 

You now have the result, just need to convert it into something that PowerApps can work with (JSON.parse) 🙂

Kind regards, John

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,110)