Showing results for 
Search instead for 
Did you mean: 
Resolver I
Resolver I

Pass variable from powerapps to flow



I am currently working on a document library in PowerApps. I want to have a multiple selection of items and a button to trigger the flow. Unfortunately im having a hard time working to get only the item ID of the selected items from PowerApps and using it on Get Items action in MS Flow.


Please help.





I already used the 'Ask in PowerApps' for filter query but im having this error and not getting the item ID of the selected items on powerapps.












Dual Super User III
Dual Super User III

Try passing the ID's from PowerApps as a comma delimited list.  You can then use Split on that list in Flow to create an Array of IDs.  That should work in your Apply to Each to do a Get Item for each ID which will return the record you want to work on.  That's much more straightforward than trying to do an OData query on multiple items.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1  ~can you give me a sample for your provided solution? I am currently new to PowerApps and im kinda lost on how to get things done.

Not applicable

I am no authority on these, but it looks like your Flow requires more than one parameter to be passed in, not just the ID.






It looks like it is complaining about one of these not being present Getitems_FilterQuery



Those parameters are created automatically by flow when you use the 'Ask in PowerApps' on Get Items filter query. On PowerApps, I am just passing the selected IDs from PowerApps to Flow which I think should be the only value in the parameter Ask In PowerApps

Here's what I created as a test.  My data source is called 'Test'.  First I added a checkbox to the Gallery that displays in each record.  I added the following to the OnCheck property to add the ID of each selected record to a collection


This goes in the OnUncheck to remove the ID from the collection if unchecked


Then in my button to call the Flow (PowerAppsbutton-2) I used this code to build a comma delimeted string of the IDs in the selected collection


Then in the Flow I Initialize a Variable using this formula to translate the CSV string to an Array


That array then becomes the basis for my Apply to each loop to get each record and send the emails


Hope that helps.


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 - I am close to resolving this. I am already getting the values from PowerApps to Flow. However, the values that im getting is not comma delimited.



Did you check to make sure all the IDs are being added to the collection when check or uncheck the boxes?  If they are then this is the code that creates the comma delimited string that you pass to flow.


You may also be sending other parameters.  Make sure you are using the right one when it gets to Flow to build the array.  Also, you use that array in a get Item action inside a loop to get each record from SharePoint.  Then in the same loop use the values you retrieve using the Get Item to fill in the email that you want to send.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Yes, i already check everything that you posted. I think im only passing one parameter from PowerApps to Flow using what you have posted PowerApp.Run(Concat(Selected,Text(ID),",")). Is there a way to check for other parameters that are being passed on from PowerApps to Flow?


On the Initialize variable, I am initializing itemids with this expression: split(triggerBody()['getitem_id'],',') How would i know what parameter to use inside that triggerbody?

Now im getting this error on the initialize action:


The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Integer'

Helpful resources

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users


We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (26,983)