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
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,007)