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
- Open Power Apps Studio.
- Insert a Vertical Gallery.
- Bind the gallery to your data source.
- 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
- Personalized user experience
- Quick access to important records
- Improved navigation
- Enhanced productivity
- Modern application design
Common Use Cases
- Favorite customers
- Important projects
- Frequently used products
- Priority tasks
- Bookmarked documents
- Saved employee records
Key Takeaways
- Bookmark icons improve user experience.
- Collections can store favorite records temporarily.
- Conditional formatting highlights bookmarked items.
- Users can quickly access frequently used records.
- Suitable for modern Canvas App designs.