Stage 12 of 17

Stage 12 of 17

Troubleshooting

11 troubleshooting scenarios covering the most common issues in the Supplier and Contract Management application.

TS-001

Contract reminder emails are being sent multiple times for the same milestone

Reported

"James Okafor reports he received 4 "180-day reminder" emails for CON-001 over 4 consecutive days."

Expected

One reminder email per milestone per contract.

Actual

Multiple emails for the same milestone.

Evidence to Gather

  1. 1.Check the DToDLab012-ContractReminder flow run history. Did the flow run on each of the 4 days?
  2. 2.Check the ReminderSentFlags field for CON-001 in the Contracts list. Does it contain "180"?
  3. 3.Check the Update item action in the flow — did it succeed on the first run?

Likely Cause

The Update item action that sets ReminderSentFlags failed on the first run (e.g. due to a connection error or permission issue). The flow sent the email but did not update the flag. On subsequent runs, the flag was still blank, so the condition passed again and another email was sent.

Fix

Add a Configure run after to the Update item action to handle failures. Add error handling: if the Update item fails, send an alert to Tom Reeves. Verify the flow connection has Edit permission on the Contracts list.

Retest

Set ReminderSentFlags to blank for a test contract. Run the flow twice. Verify only one email is sent and ReminderSentFlags is updated after the first run.

TS-002

RiskRating is not being calculated — RiskRating column is blank after saving a risk

Reported

"Priya Mehta reports that new risks have a blank RiskRating field."

Expected

RiskRating is calculated automatically by DToDLab012-RiskRatingCalc when a risk is created.

Actual

RiskRating is blank.

Evidence to Gather

  1. 1.Check the DToDLab012-RiskRatingCalc flow run history. Did the flow run when the risk was created?
  2. 2.If yes: did the Switch expression produce the correct output? Did the Update item action succeed?
  3. 3.If no: check whether the flow is turned on. Check the trigger — is it set to the correct list?

Likely Cause

Most likely causes: (1) The flow is turned off. (2) The Switch expression has a syntax error — the concat expression must exactly match the Likelihood and Impact choice values (case-sensitive). (3) The Update item action failed because the RiskRating column name in the flow does not match the internal name in SharePoint.

Fix

Verify the flow is turned on. Check the Switch expression — the values must match exactly (e.g. "High-High" not "high-high"). Check the RiskRating column internal name in SharePoint (List settings → Columns → RiskRating → check the URL).

Retest

Create a new risk with Likelihood = High, Impact = High. Wait 30 seconds. Verify RiskRating = Critical.

TS-003

Supplier lookup is blank on the New Review form after selecting a contract

Reported

"James Okafor reports the Supplier field does not auto-populate when he selects a contract on the New Review form."

Expected

Selecting a contract auto-populates the Supplier field from the contract record.

Actual

Supplier field remains blank.

Evidence to Gather

  1. 1.Check the OnChange formula for the Contract dropdown (ddReviewContract).
  2. 2.Is the Set(varReviewSupplier, ...) formula present?
  3. 3.Check whether varReviewSupplier is being used to populate the Supplier field on the form.

Likely Cause

The OnChange formula for the Contract dropdown is missing or incorrect. The LookUp expression must find the contract in colContracts and then look up the supplier from colSuppliers using the Supplier.Id from the contract.

Fix

Add or correct the OnChange formula: Set(varReviewSupplier, LookUp(colSuppliers, ID = LookUp(colContracts, ID = ddReviewContract.Selected.ID).Supplier.Id)). Verify the Supplier field on the form is bound to varReviewSupplier.

Retest

Open the New Review form. Select a contract. Verify the Supplier field is auto-populated.

TS-004

Dashboard KPI cards show 0 even though contracts and risks exist

Reported

"Helena Marsh reports the dashboard shows 0 for all KPI cards."

Expected

KPI cards show non-zero values based on the sample data.

Actual

All KPI cards show 0.

Evidence to Gather

  1. 1.Check the App OnStart formula. Did the ClearCollect actions run successfully?
  2. 2.Check whether colContracts and colRisks are populated. Add a temporary label with Text = CountRows(colContracts) to verify.
  3. 3.Check the SharePoint connection — has it expired?

Likely Cause

The ClearCollect actions in App OnStart failed, leaving the collections empty. This can happen if the SharePoint connection has expired, the list names in the formula do not match the actual list names, or the user does not have access to the lists.

Fix

Re-authenticate the SharePoint connection. Verify the list names in the ClearCollect formulas match the actual list names exactly (case-sensitive). Verify the user has access to all lists.

Retest

Close and reopen the app. Verify the KPI cards show non-zero values.

TS-005

Contracts screen does not show the expiry colour coding

Reported

"James Okafor reports all contracts show the same colour for DaysToExpiry regardless of how close they are to expiry."

Expected

Contracts within 30 days show red, within 90 days show amber, otherwise green.

Actual

All contracts show the same colour.

Evidence to Gather

  1. 1.Check the DaysToExpiry label colour formula in the gallery.
  2. 2.Is the formula using DateDiff(Today(), ThisItem.EndDate, Days) or a variable?
  3. 3.Check whether the formula is applied to the correct label.

Likely Cause

The colour formula is applied to the wrong label, or the DateDiff expression is not returning the correct value. A common mistake is using DateDiff(ThisItem.EndDate, Today(), Days) (reversed arguments) which returns a negative number.

Fix

Verify the colour formula is: If(DateDiff(Today(), ThisItem.EndDate, Days) <= 30, RGBA(220,38,38,1), If(DateDiff(Today(), ThisItem.EndDate, Days) <= 90, RGBA(245,158,11,1), RGBA(34,197,94,1))). Ensure the arguments are in the correct order: Today() first, EndDate second.

Retest

Verify CON-012 (EndDate 31 Dec 2026) shows red. Verify a contract with EndDate 6 months away shows green.

TS-006

New Supplier button is visible to Finance user (Sandra Obi)

Reported

"Sandra Obi reports she can see the New Supplier button in the Power App."

Expected

The New Supplier button is only visible to procurement team members (varIsProcurement = true).

Actual

Button is visible to Sandra Obi.

Evidence to Gather

  1. 1.Check the Visible property of the New Supplier button.
  2. 2.Is it set to varIsProcurement?
  3. 3.Check the colProcurementEmails collection in App OnStart — is Sandra Obi's email in the list?

Likely Cause

Sandra Obi's email address is in the colProcurementEmails collection, so varIsProcurement = true for her. Or the Visible formula is not using varIsProcurement.

Fix

Remove Sandra Obi's email from colProcurementEmails. Verify the Visible formula on the New Supplier button is: varIsProcurement.

Retest

Log in as Sandra Obi. Verify the New Supplier button is not visible.

TS-007

Contract Details tabs not switching — all 4 galleries visible at the same time

Reported

"James Okafor reports all 4 tab galleries (Services, Reviews, Risks, Actions) are visible simultaneously on the Contract Details screen."

Expected

Only the selected tab gallery is visible.

Actual

All galleries are visible.

Evidence to Gather

  1. 1.Check the Visible property of each gallery.
  2. 2.Is each gallery's Visible property set to varContractTab = "Services" (or the appropriate tab name)?
  3. 3.Check the OnSelect formula of each tab button — is it setting varContractTab correctly?

Likely Cause

The Visible property of the galleries is not set, or is set to true unconditionally. Or the tab button OnSelect formulas are not setting varContractTab.

Fix

Set the Visible property of each gallery: Services gallery: varContractTab = "Services". Reviews gallery: varContractTab = "Reviews". Risks gallery: varContractTab = "Risks". Actions gallery: varContractTab = "Actions". Set the default tab in App OnStart or on the Contract Details screen OnVisible: Set(varContractTab, "Services").

Retest

Open Contract Details for CON-001. Verify only the Services gallery is visible by default. Select the Reviews tab. Verify only the Reviews gallery is visible.

TS-008

Overdue action reminders not being sent

Reported

"Tom Reeves reports the DToDLab012-OverdueActions flow is running but no emails are being sent."

Expected

Overdue action owners receive daily reminder emails.

Actual

No emails sent.

Evidence to Gather

  1. 1.Check the DToDLab012-OverdueActions flow run history. Did the flow run?
  2. 2.Check the Get items action — did it return any results?
  3. 3.Check the OData filter query — is the date comparison correct?

Likely Cause

The OData filter query for the Get items action is incorrect. The date comparison must use the ISO 8601 format. A common mistake is using a plain date string instead of the utcNow() expression.

Fix

Correct the filter query: DueDate lt '@{utcNow()}' and Status ne 'Complete'. Ensure the date is in ISO 8601 format. Test by manually triggering the flow and checking the Get items output.

Retest

Create a test action with DueDate = yesterday. Manually trigger the flow. Verify the action owner receives a reminder email.

TS-009

Power App crashes on load — "Something went wrong"

Reported

"Multiple users report the app shows "Something went wrong" when they open it."

Expected

The app loads successfully for all users.

Actual

App crashes on load.

Evidence to Gather

  1. 1.Check the App OnStart formula.
  2. 2.Check the SharePoint connection — has it expired?
  3. 3.Check whether any of the 6 lists have been renamed or deleted.

Likely Cause

The SharePoint connection has expired, or a list referenced in the ClearCollect formulas has been renamed or deleted.

Fix

Re-authenticate the SharePoint connection. Verify all 6 list names in the ClearCollect formulas match the current list names.

Retest

Open the app. Verify it loads successfully.

TS-010

Supplier Details screen shows no linked contracts

Reported

"Priya Mehta reports that the Supplier Details screen for CloudCore Ltd shows no linked contracts, even though CON-001, CON-002, and CON-012 exist."

Expected

All active contracts linked to CloudCore Ltd are shown on the Supplier Details screen.

Actual

No contracts shown.

Evidence to Gather

  1. 1.Check the linked contracts gallery Items formula.
  2. 2.Is it using Supplier.Id = varSelectedSupplier.ID?
  3. 3.Check whether varSelectedSupplier is set correctly when navigating to the Supplier Details screen.

Likely Cause

The linked contracts gallery Items formula is comparing the wrong fields. SharePoint Lookup columns return an object — the ID is at Supplier.Id, not Supplier. Or varSelectedSupplier is not being set before navigating to the screen.

Fix

Verify the gallery Items formula: Filter(colContracts, Supplier.Id = varSelectedSupplier.ID, Status <> "Terminated"). Verify the Suppliers gallery OnSelect formula: Set(varSelectedSupplier, ThisItem); Navigate(scrSupplierDetails).

Retest

Select CloudCore Ltd from the Suppliers screen. Verify CON-001, CON-002, and CON-012 appear in linked contracts.

TS-011

ReminderSentFlags not updating — flag is appended incorrectly

Reported

"Tom Reeves reports that after the first reminder, ReminderSentFlags shows "|180" (with a leading pipe) instead of "180"."

Expected

ReminderSentFlags = "180" after the first reminder.

Actual

ReminderSentFlags = "|180".

Evidence to Gather

  1. 1.Check the Update item action in the flow.
  2. 2.What is the concat expression for ReminderSentFlags?

Likely Cause

The concat expression is: concat(items('Apply_to_each')?['ReminderSentFlags'], '|', '180'). When ReminderSentFlags is blank, this produces "|180" (blank + pipe + 180).

Fix

Use a conditional expression: if(empty(items('Apply_to_each')?['ReminderSentFlags']), '180', concat(items('Apply_to_each')?['ReminderSentFlags'], '|180')). This produces "180" when the field is blank, and "180|120" when appending.

Retest

Clear ReminderSentFlags for a test contract. Run the flow. Verify ReminderSentFlags = "180" (no leading pipe). Run the flow again for the 120-day milestone. Verify ReminderSentFlags = "180|120".

Stage Complete — What You Now Have

  • ✓11 troubleshooting scenarios
  • ✓Covers: duplicate reminders, risk rating, supplier auto-populate, dashboard KPIs, expiry colours, security, tab switching, overdue actions, app crash, linked contracts, ReminderSentFlags leading pipe bug
NextRelease

Need more help with the concepts?

Visit DosToDigital for guides, templates, and deeper explanations.

DosToDigital
DToD Labs

Learn it. Build it. Make it work.

A DosToDigital Project

About DToD Labs

Practical technology learning for Microsoft 365 and Power Platform. Build real business solutions from real business problems.

Learn the concepts at DosToDigital. Put them into practice at DToD Labs.

DToD Labs provides practical learning projects for educational purposes. Microsoft services, interfaces, licensing and product capabilities change over time. Always check current Microsoft documentation and licensing before implementing a solution in a production environment. All organisations, business scenarios and data used in DToD Labs are fictional. Learners should not use confidential employer, customer or personal information when following DToD Labs exercises.

© 2026 DToD Labs — A DosToDigital Project