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

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
DavesTechTips
Super User
Super User

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 😉

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.

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.

OK, that will work. But it doesn't answer how do I get 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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (12,573)