In our previous deep dive on the document management app, Search Functionality for SharePoint Document Management Application, we showed how we make navigating SharePoint libraries effortless. This time we focus on a favorite usability boost: automated notifications that highlight each new entry in a SharePoint library the moment it appears.
Highlighting New Entries Inside SharePoint Libraries
Our document management app aggregates every entry from the connected SharePoint libraries. One of those libraries tracks each user’s open tasks. To keep work from slipping through the cracks, a red badge inside the interface displays the number of outstanding items—no need to open the list or refresh the page.

Automatic Badge Refreshes
Whenever a task changes—because someone assigns a new item or completes an existing one—the notification updates itself on a fixed cadence. We rely on the JavaScript setInterval helper to trigger our data fetch every 300,000 milliseconds (five minutes), so users always see a current count.
JavaScript Interval for Badge Updates
private loadOpenTasksCount() {
// First call without delay
this.executeLoadOpenTasksCountCommand();
// Check open tasks every five minutes
this.interval = setInterval(this.executeLoadOpenTasksCountCommand, 300000);
}
Querying the List Entries
The badge uses a REST query against SharePoint. To keep it fast, we only select the Id field, filter for the signed-in user plus the desired task status, and return the number of matches to the interface.
REST Query with Filter Criteria
public static getOpenTasksCount(): Promise<number> {
const service: SPRestService = SPServiceProvider.GetCurrentSPService();
const selectQuery = 'Id';
const filterQuery = `AssignedToId eq ${AppContext.currentUser.id} and Status eq 'In Progress'`;
return service
.getListItemsByFilter(AppContext.taskList, selectQuery, filterQuery)
.then(items => (items && items.value ? items.value.length : 0));
}
Service Call into the SharePoint Library
public getListItemsByFilter(list: IList, selectQuery?: string, filterQuery?: string) {
const restAPI = `${this.context.pageContext.web.absoluteUrl}/_api/web/Lists(guid'${list.Id}')/items?${
selectQuery !== null && selectQuery !== undefined ? `$select=${selectQuery}` : ''
}${
filterQuery !== null && filterQuery !== undefined ? `&$filter=${filterQuery}` : ''
}`;
return this.context.spHttpClient
.get(restAPI, SPHttpClient.configurations.v1)
.then(response => response.json());
}
Takeaways
Visual notifications coupled with lean REST queries ensure SharePoint users understand their workload in seconds while the platform stays responsive. Every new entry is flagged immediately, and the five-minute refresh cadence keeps the badge trustworthy throughout the day.