The Problem: Real-Time SLA Tracking in Power Apps

Service Level Agreement (SLA) tracking is critical for IT support. It means monitoring ticket response and resolution times against predefined targets. For a "Critical" ticket, a 60-minute target might be in place. The system needs to alert stakeholders if a ticket is approaching or has breached this deadline. Traditionally, this is handled by scheduled background jobs, often implemented using tools like Power Automate. These flows periodically query the ticket system, check the age of critical tickets, and flag those in jeopardy.

The challenge faced by the developer was to implement this live SLA tracking within Power Apps itself, using only its internal collections and without relying on external services like Power Automate. This meant finding a way to achieve "real-time" SLA status without a dedicated background process constantly running and checking data. The core question was: can Power Apps provide dynamic SLA monitoring directly within the application's logic, recalculating status as needed rather than on a fixed schedule?

The Trick: Recalculate on Read, Not on Timer

The solution hinges on a fundamental shift in approach: instead of a timer-based system that checks for breaches, the SLA status is recalculated every time the relevant data is accessed or displayed. This is achieved by leveraging Power Apps' collection capabilities and its formula language.

When a user views a list of tickets, or a specific ticket detail screen, the application's logic triggers the SLA calculation for each visible ticket. This calculation involves comparing the ticket's creation time (or last update time, depending on the SLA definition) against the current time, and factoring in predefined SLA targets. For instance, if a ticket was created at 10:00 AM and has a 60-minute SLA, and the user views it at 10:55 AM, the SLA engine would calculate that it has 5 minutes remaining. If viewed at 10:59 AM, it has 1 minute. If viewed at 11:01 AM, it is breached.

This approach avoids the need for a persistent background process. Instead, the computation is performed on-demand, directly within the user's session. The primary mechanism involves using Power Apps' `Now()` function to get the current timestamp and comparing it with the ticket's timestamp. The difference, when compared against the SLA duration, determines the status.

Power Apps screen displaying a list of IT tickets with real-time SLA status indicators.

Implementation Details: Collections and Formulas

The developer utilized Power Apps collections to store and manage ticket data within the application's memory. When the ticket list is loaded, or when a user navigates to a detailed view, specific formulas are executed.

For each ticket, a calculation is performed to determine its SLA status. This typically involves:

  • Retrieving the ticket's creation timestamp (e.g., `ThisItem.CreatedOn`).
  • Retrieving the applicable SLA duration for that ticket type (e.g., from a separate settings table or hardcoded based on priority).
  • Calculating the SLA deadline by adding the duration to the creation timestamp.
  • Comparing the current time (`Now()`) with the SLA deadline.

The results of these calculations can then be used to dynamically update the UI. For example, a ticket nearing its SLA breach could be displayed with a yellow warning indicator, while a breached ticket could show red. Tickets well within their SLA might show green.

This method means that the SLA status is always current from the user's perspective at the moment they view it. It's akin to calculating the remaining time on a countdown timer only when you glance at the clock, rather than having a background process constantly ticking down and alerting you every second. The computational load is distributed across user interactions rather than concentrated in a background job.

Advantages of the On-Demand Approach

The primary advantage of this method is its independence from external services like Power Automate. This significantly simplifies the application's architecture, reduces licensing overhead (as Power Automate flows can incur costs), and eliminates potential points of failure associated with external services. For users of Power Apps, particularly those within organizations seeking to consolidate tooling or reduce dependencies, this is a powerful demonstration of what can be achieved natively.

Furthermore, the "recalculate on read" approach ensures that the SLA status displayed is always fresh. There's no lag between a potential breach and its reflection in the UI, as the calculation happens at the precise moment the data is rendered. This is crucial for time-sensitive SLA monitoring.

The entire system, comprising 9 screens, role-based access, live SLA tracking, and automatic email notifications (handled by Power Apps' native capabilities where possible, or by triggering external actions only when strictly necessary and controlled), was built without needing a separate workflow engine. This showcases a more integrated and self-contained development within the Power Platform.

Considerations and Potential Limitations

While this approach is elegant and efficient for many use cases, there are considerations. The SLA calculation occurs on the client-side (within the user's Power Apps session). If a user has a very large number of tickets open simultaneously, or if the SLA calculation logic becomes extremely complex, it could potentially impact the performance of the Power App on that user's device. However, for typical IT ticket volumes and standard SLA rules, this is unlikely to be a significant issue.

Another point is that this method doesn't provide proactive, system-wide alerts for SLA breaches that occur when no user is actively viewing the affected tickets. If a critical ticket breaches its SLA at 3:00 AM and no one is using the app, no immediate notification will be sent by the Power App itself. For such scenarios, a hybrid approach might be considered, where critical breaches occurring outside of active user sessions could trigger a Power Automate flow or a similar background task. However, for many internal IT departments, the primary need is for support staff and managers to see the status *when they are working*, making the on-demand recalculation sufficient.

The surprising detail here is not the complexity of the SLA engine, but its very existence within Power Apps without the reliance on its often-paired automation tool, Power Automate. This challenges the common assumption that such dynamic, time-sensitive tracking necessitates external workflow services. It demonstrates a more direct, application-centric implementation strategy.

Broader Implications for Low-Code Development

This project highlights the growing sophistication of low-code platforms like Power Apps. Developers are finding ways to implement complex business logic natively, reducing reliance on external integrations and potentially lowering costs and complexity. For IT departments looking to build custom solutions for internal processes, this approach offers a compelling template for creating functional and responsive applications entirely within the Power Platform ecosystem.

What remains to be fully explored is the scalability of such purely client-side, on-demand calculation engines for extremely large datasets or enterprise-wide deployments with thousands of concurrent users. However, for mid-sized organizations or specific departmental needs, this method presents a robust and efficient solution.