cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
boonyar
Advocate I
Advocate I

Select multiple items in Gallery

Hi

 

I like to know if is possible to select multiple items in a Gallery of items. I tried to hold CTRL-Click but couldn't effect the multiple selection. Any idea will be helpful.

 

Thank You,

 

Cheers,

Boon Yar

2 ACCEPTED SOLUTIONS

Accepted Solutions
Perumal
Continued Contributor
Continued Contributor

Hi,

 

I have suggested to use Collection.

 

Example:

 

In Screen1, on the the "OnSelect" of Checkbox control have the below formula, which will add the selected items to the collection.

OnSelect: Collect(SelectedItems,ThisItem)

In Screen2, have a gallery control with "SelectedItems" collection as source.

 

I think, this clarifies you.

 

 

View solution in original post

I believe in your other browse gallery on the next screen, you want to add, "SelectedItems" to the Items field in the Data section. That will point the browse gallery on the other sreen to the items selected, and stored in your collection.

 

Hope this helps!

View solution in original post

14 REPLIES 14
Perumal
Continued Contributor
Continued Contributor

Currently the Gallery control does not support multi-selection. I don't know your use-case for the multi-selection, but you can try the below workaraound. The workaround works by adding a checkbox in the gallery items and a collection to hold the selected items.

 

1. Add a CheckBox in the gallery control. 

2. Use a collection to hold the selected items. Update the "OnSelect" of Checkbox control with "Collect(SelectedItems,ThisItem)"

 

Now everytime, you select an item in the gallery, its get added to the collection. You can use this collection for further processing. 

 

Below is the sample tried with this idea. On the right-side you can view the selected items added to a collection.

powerapps.png

 

Hope this helps you.

Hi Perumal,

 

Ok sure let me try that workaround.

 

My use case was I am trying to match a selected list of items with another collection. Anyway I will give this a go and see how it goes.

 

Cheers

Boon Yar

Hi Perumal,

 

Thanks for the suggestion. I managed to get the option field added but not entirely get what i need. I am testing if I were to check multiple records, it will show me all records relating to the selected items. But I could not get this, everytime it only shows relating records of only one of the selected items in the gallery.

 

 

Multi select team membersMulti select team members

 This is Gallery1_3

 

It should display relating records of Boon Yar(Aeris) as wellIt should display relating records of Boon Yar(Aeris) as well

 So on this second screen, my items formula read like this:

 

Items = Filter(Calendar,Name=Gallery1_3.Selected.Name)

 

I get a feeling what I filter is like only the first selected record and not all selected items. So instead of say Name =.... wondering if there is a way to get Name in {.... selected items..}

 

Thanks for your advice 🙂

 

Cheers,

Boon Yar

Perumal
Continued Contributor
Continued Contributor

Hi,

 

I have suggested to use Collection.

 

Example:

 

In Screen1, on the the "OnSelect" of Checkbox control have the below formula, which will add the selected items to the collection.

OnSelect: Collect(SelectedItems,ThisItem)

In Screen2, have a gallery control with "SelectedItems" collection as source.

 

I think, this clarifies you.

 

 

View solution in original post

There is one issue I noticed. When you scroll up and down the selected check box value disappears... Do you see the issue?

I believe in your other browse gallery on the next screen, you want to add, "SelectedItems" to the Items field in the Data section. That will point the browse gallery on the other sreen to the items selected, and stored in your collection.

 

Hope this helps!

View solution in original post

Sorry guys for the slow response... 

 

After learning powerapps through a few implementations, yes totally agree with your suggested solution.

 

Thanks alot !!

Hi AmitLoh,

 

Actually I didnt get that problem, do you want to explain more on this so that everyone can share.

 

Thanks

Boon Yar

Hi Bri,

 

Yes tested it works! Thank you!

 

Cheers,

Boon Yar

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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