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 News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,807)