Stage 12 of 17
In this stage you will work through six realistic troubleshooting scenarios for the Leave Request Application. Each scenario follows the same structure: symptom → investigation → root cause → resolution → prevention. These scenarios are drawn from the most common issues encountered with Power Apps and Power Automate approval solutions.
Why Are We Doing This?
Identify which system the symptom is in
Is the problem in the Power Apps app (user interface), the Power Automate flow (automation), or the SharePoint list (data)? The symptom tells you where to look first.
Check the Power Automate run history
For any issue involving the approval email or status updates, the run history is the first place to look. It shows whether the flow ran, whether it succeeded or failed, and exactly which action failed.
Check the SharePoint list record
For any issue involving data (wrong status, missing fields, wrong values), open the list record directly in Microsoft Lists. This shows the actual data, independent of what the app displays.
Check permissions
Many Power Apps and Power Automate issues are caused by incorrect permissions. If an action fails with an access denied error, check the permissions of the user or the flow connection.
Reproduce the problem
Can you reproduce the problem yourself? If yes, you can investigate it directly. If no, the problem may be user-specific (permissions, browser, account) or intermittent.
Fix the root cause, not the symptom
Fixing the symptom without fixing the root cause means the problem will recur. Always identify why the problem happened before deciding how to fix it.
Approval email not received by manager
How It Was Reported
"James submitted a leave request two days ago. His manager Priya says she has not received an approval email. The request shows Status = Submitted in the list."
Investigation Steps
Root Cause
The flow ran but the approval action failed because the ManagerEmail field contained a typo: "priya.sharma@contoso.co.uk" was entered as "priya.sharma@contoso.co.uk " (with a trailing space). The email was sent to an invalid address.
Resolution
Correct the ManagerEmail field in the list record (remove the trailing space). Re-trigger the flow by changing the Status to Draft and back to Submitted, or manually send the approval email to Priya.
Prevention
Add a validation rule in the Power Apps app that trims whitespace from the Manager Email field before saving: Trim(ManagerEmailInput.Text). Also add a basic format check.
Flow succeeded but status did not update
How It Was Reported
"Priya approved a request via email. The flow shows as Succeeded in the run history. But the list record still shows Status = Submitted."
Investigation Steps
Root Cause
The Update item action used the wrong ID. The flow used the ID from the trigger output, but the trigger output ID was the ID of the approval record (in the Approvals system), not the ID of the SharePoint list item. The SharePoint list item was not updated.
Resolution
Open the flow in edit mode. Find the Update item action. Check the ID field — it should reference the ID from the SharePoint trigger (the "When an item is created" trigger), not from the approval action. Correct the ID reference and save the flow. Manually update the affected list record.
Prevention
When building the flow, always verify that the ID used in Update item comes from the SharePoint trigger, not from any other action. Label the trigger output clearly in the flow.
Approval email sent to wrong manager
How It Was Reported
"Sophie submitted a leave request. The approval email was sent to Daniel Torres, not to Priya Sharma. Sophie reports to Priya."
Investigation Steps
Root Cause
Sophie entered the wrong manager email when submitting the request. She typed "daniel.torres@contoso.co.uk" instead of "priya.sharma@contoso.co.uk". The flow correctly sent the approval to the email address stored in the record — the data was wrong, not the flow.
Resolution
Update the ManagerEmail field in the list record to the correct address. The flow has already run — it cannot be re-triggered automatically. Options: (1) ask Daniel to forward the approval email to Priya, (2) manually update the Status to Approved/Rejected after getting Priya's decision by other means, (3) delete the record and ask Sophie to resubmit with the correct manager email.
Prevention
Add a validation rule that checks the Manager Email does not match the Employee Email (to prevent self-approval). Consider adding a lookup from Azure AD in a future version. Add a note in the user guide about the importance of entering the correct manager email.
Power Apps gallery not refreshing after approval
How It Was Reported
"Ravi's leave request was approved. He can see the approval notification email. But when he opens the Power Apps app, the request still shows Status = Submitted."
Investigation Steps
Root Cause
The OnVisible property of the My Requests screen was missing the Refresh(LeaveRequests) formula. The gallery was showing cached data from when the screen was first loaded. Navigating away and back did not refresh the data because the refresh formula was not present.
Resolution
Open the Power Apps app in edit mode. Select the My Requests screen. Set the OnVisible property to: Refresh(LeaveRequests). Save and republish the app. Ask Ravi to close and reopen the app.
Prevention
Always add Refresh(DataSource) to the OnVisible property of any screen that displays data that can be updated by an external process (such as a flow). This is a standard pattern for Power Apps connected to SharePoint.
Duplicate request submitted
How It Was Reported
"James has two identical leave requests in the system, both with Status = Submitted. He only submitted one request."
Investigation Steps
Root Cause
James selected the Submit button twice in quick succession. The first tap submitted the request and started navigating away. The second tap (before the navigation completed) submitted a second request. The Submit button was not disabled after the first tap.
Resolution
Delete the duplicate record from the Microsoft Lists interface. Add a variable to the Submit button to prevent double-submission: set a variable (e.g. IsSubmitting) to true when Submit is tapped, and set the button's DisplayMode to Disabled when IsSubmitting is true. Reset the variable when the navigation completes.
Prevention
Add a loading state to the Submit button. After the Patch() call, disable the button until the navigation is complete. This is a standard pattern for preventing duplicate submissions in Power Apps.
Employee cannot submit a request — access denied error
How It Was Reported
"Chloe tries to submit a leave request. She gets an error: "The attempted operation is prohibited because it exceeds the list view threshold or is blocked by a list view threshold policy.""
Investigation Steps
Root Cause
Chloe was added to the Site Visitors group (Read permission) instead of the Site Members group (Contribute/Edit permission). The Patch() formula in the Power Apps app requires at least Contribute permission to create a new list item. With only Read permission, the create operation fails.
Resolution
Move Chloe from the Site Visitors group to the Site Members group. Ask her to try submitting again.
Prevention
When adding new employees to the system, always add them to the Site Members group (not Site Visitors). Document this in the onboarding process. Consider using a Microsoft 365 group for all employees so that new starters automatically get the correct permission.
A new support ticket has arrived:
Support Ticket #0089
"Hi IT team, I submitted a leave request last week and got an email saying it was approved. But when I look at the app, it still says Submitted. My manager also says she approved it. I need to know if my leave is actually approved before I book my flights. — Sophie Nguyen"
Work through the troubleshooting methodology. What would you investigate first? What are the possible causes? Which scenario from this stage is most similar?
Application Support View
Need more help with the concepts?
Visit DosToDigital for guides, templates, and deeper explanations.