How to Add a Bookmark Icon to a Gallery Row in Power Apps

How to Add a Bookmark Icon to a Gallery Row in Power Apps

Power Apps Gallery controls are commonly used to display lists of records such as customers, products, employees, or tasks. Adding a bookmark icon to each gallery row allows users to save favorite records and quickly access them later.

This functionality improves user experience and provides a personalized way for users to manage frequently accessed records.

Business Scenario

Suppose your application displays hundreds of customer records. Users want to mark important customers as favorites and access them quickly without searching repeatedly.

Step 1: Insert a Gallery

  1. Open Power Apps Studio.
  2. Insert a Vertical Gallery.
  3. Bind the gallery to your data source.
  4. Add labels to display record information.

Step 2: Add a Bookmark Icon

Insert a Bookmark icon inside the gallery template.

Insert

↓

Icons

↓

Bookmark

Step 3: Create a Collection for Favorites

ClearCollect(
colBookmarks,
[]
)

This collection will store bookmarked records.

Step 4: Bookmark Icon OnSelect

If(
IsBlank(
LookUp(
colBookmarks,
ID = ThisItem.ID
)
),
Collect(
colBookmarks,
ThisItem
),
RemoveIf(
colBookmarks,
ID = ThisItem.ID
)
)

This code toggles the bookmark status for a selected record.

Step 5: Change Bookmark Icon Color

If(
ThisItem.ID in colBookmarks.ID,
Color.Gold,
Color.Gray
)

Bookmarked records will display a highlighted icon.

Step 6: Display Favorite Records

colBookmarks

Use the collection as the Items property of another gallery to display favorite records.

Benefits

Common Use Cases

Important: For permanent bookmarks, store favorite records in Dataverse or SharePoint instead of using temporary collections.

Key Takeaways