@JP-23050700-0
1. Add a Bell Icon
Insert a bell icon from Insert > Icons > Bell and name it iconBell.
2. Create a Collection on App Start or OnVisible
If your leave requests are in a Dataverse table or SharePoint list (e.g., LeaveRequests), collect the count of pending requests:
ClearCollect(
colPendingLeaves,
Filter(LeaveRequests, Status = "Pending")
);
➡️ Place this in App.OnStart or Screen.OnVisible.
3. Add a Label as Badge
Add a Label on top of the bell icon and use the following settings:
Text:
CountRows(colPendingLeaves)
Visible:
CountRows(colPendingLeaves) > 0
Style:
Shape: Circle or oval.
Background: Red.
Text color: White.
Font size: 12.
Size: Small (e.g., 20x20).
Position: Overlay the top-right of bell icon.
Example X/Y (Position):
If your iconBell has X=200, Y=50:
X: iconBell.X + iconBell.Width - 10
Y: iconBell.Y - 5
Make It Live
To auto-refresh the badge, you can:
Use a Timer control to refresh colPendingLeaves.
Or trigger ClearCollect(...) whenever a new request is submitted or modified.
Optional: Use Context Variable
Instead of collection:
UpdateContext({ pendingCount: CountRows(Filter(LeaveRequests, Status = "Pending")) })
Then use pendingCount for the label.
Thanks!
If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.