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

Highlight gallery items based on another gallery

Hello,

I'm using a gallery of names (StudentList) to check off attendance. As I select items I'm building another collection / gallery to list who has been selected but I'd like to find a way of leaving the original names in StudentList selected or highlighted so that non attendees can be found easily. Can I use the attendees gallery to highlight names in the StudentList gallery? Any suggestion would be appreciated.

Kind regards,

Dale Flemming

 

1 ACCEPTED SOLUTION

Accepted Solutions

Do they two tables have anything in common, like and ID?

if so try in the TemplateFill of Gallery 2

If(ThisItem.ID in Gallery1.AllItems.ID,Green,White)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

8 REPLIES 8
VijayTailor
Resident Rockstar
Resident Rockstar

Hi,
you can use the Template Fill Properties based on condition for Both Gallery.

there you can set the Color based on Conditions Like if studentPresent = true/Yes,MistyRose,Red like that.

I see. So, if both galleries have {name, studentID} fields what would the code in the TemplateFill look like?

Can you show a screenshot of the Galleries, are they on the same screen or different screens?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi, the galleries are on the same screen. I've attached a screenshot.

Thanks.

In the TemplateFill put;

If(ThisItem.IsSelected,Green,White)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thanks, that will highlight an item I've selected but I'm looking for a solution where the 3 items in the right gallery are used to highlight the same items in the left gallery. 

Do they two tables have anything in common, like and ID?

if so try in the TemplateFill of Gallery 2

If(ThisItem.ID in Gallery1.AllItems.ID,Green,White)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Yes! Thanks, that worked perfectly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,343)