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

Subset of a gallery?

Hey all, I'm looking to make a check-list beside a list of users, and only grab a subsection of them to display on later screens. Basically, say I have 4 rows in a gallery, I would like to grab only the specified rows and display them later. Say I want to only display 1, and 4 from within my gallery.

 

How would I go about doing this?

 

andrewlevans_0-1620936007482.png

Thanks all!

 

A

1 ACCEPTED SOLUTION

Accepted Solutions
zaphod88
Responsive Resident
Responsive Resident

Shall your users interact with those Gallery items? Just collect them into a new collection. E.g. you could insert a checkbox and set its Check and Uncheck property to:
ClearCollect(Collection, Filter(Gallery1.AllItems, Checkbox1.Value = true))
where Gallery1 is your gallery and Checkbox1 is your checkbox. Use the collection as Items property in another gallery then.

View solution in original post

4 REPLIES 4
zaphod88
Responsive Resident
Responsive Resident

Shall your users interact with those Gallery items? Just collect them into a new collection. E.g. you could insert a checkbox and set its Check and Uncheck property to:
ClearCollect(Collection, Filter(Gallery1.AllItems, Checkbox1.Value = true))
where Gallery1 is your gallery and Checkbox1 is your checkbox. Use the collection as Items property in another gallery then.

View solution in original post

@zaphod88 

Hey Zaphod88,

 

They will actually interact with it. Ex. On screen 1, I need them to select from amongst the users (1-4), say they select 1 and 3. On Screen 2 ... Screen N, I will require only the select users to show up, and fill in some text inputs for each user (row).

Okay, then the code above should work. As IMHO it is easier to handle later, you could consider adding the required inputs here already like:


ClearCollect(Collection, AddColumns(Filter(Gallery1.AllItems, Checkbox1.Value = true),"Column1",""))



Worked like a charm! Thanks so much!

 

A

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 (36,718)