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

Create and pass two Collections to Flow

I'm attempting to pass two Collections to Flow on a button press. I'm collecting People (using the OOTB People screen) and Office 365 Groups. On the first screen, the user searches for one or more people, and on the second screen, the user selects one or more Groups on a List screen.

 

In the App.OnStart, I create the following Collection:

 

Collect(MyGroups, Office365Groups.ListOwnedGroupsV2().value)

 

I have two issues:

 

First is for the List screen -- how can I collect the Groups that have checkboxes next to their entry?

 

Second is, how do I pass both Collections (MyPeople and a new Collection based on selected Groups) to Flow? The idea here is to do a foreach on the new selected Groups collection and pass the MyPeople collection to each Group.

5 REPLIES 5
Dawidvh
Level 10

Re: Create and pass two Collections to Flow

Hi @trevorseward 

 

Not exactly sure what you scenario is, but it sounds like a ComboBox could be used to show and select the groups. The SelectedItems property should then give you what you need for the collection.

ClearCollect(colSelectedGroups,ComboBox1.SelectedItems)

 

You could send the collections to Flow using the new JSON function and then parse the data in Flow, ready for action.

 

Let me know if you don't come right.

 

Dawid van Heerden
Follow on Twitter: @davestechtips
Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
**If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions. AND we get points for it 😉

trevorseward
Level: Powered On

Re: Create and pass two Collections to Flow

Looking at a combobox, that isn't a good UI experience when many Groups need to be selected -- is there a way to collect the items the checkbox is associated with?

 

For example, how would I collect just Group 1 and Group 2 in this image:

 

Untitled.png   

 

After figuring the above out, it sounds like I would either create a new collection, or clear my existing MyGroups collection and using the JSON function (will have to look into that, too but thank you for mentioning it), pass the results to Flow for parsing.

 

This doesn't solve the Search/Sort question, but those are nice-to-have rather than required-to-have.

Dawidvh
Level 10

Re: Create and pass two Collections to Flow

ComboBox is designed for large lists, as you can search directly in the ComboBox as well.

 

The check box isn't going to help much as this is not a mutli select control. You could add a gallery and as soon as someone clicks on the group, then collect that group to a collection. From the below it feels like this would be the best option here.

trevorseward
Level: Powered On

Re: Create and pass two Collections to Flow

OK, that will work. But it doesn't answer how do I get two collections to Flow.

Dawidvh
Level 10

Re: Create and pass two Collections to Flow

Hi @trevorseward 

Please see below quick video to demonstate how to upload data to Flow from PowerApps Collection.

https://youtu.be/HLdOO4JPZ2I

 

Let me know if you don't come right.

 

Dawid van Heerden
Follow on Twitter: @davestechtips
Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
**If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 191 members 6,448 guests
Please welcome our newest community members: