Stage 8 of 17

Stage 8 of 17

Build

Build the 8-screen Canvas Power App and pin it to Microsoft Teams. This stage covers the App OnStart setup, each screen in build order, the key formulas, and the Teams tab configuration.

App OnStart — Global Variables and Collections

Why Are We Doing This?

App OnStart runs once when the app loads. Use it to set global variables and collections that every screen needs — the IT team email list, the current user, and the selected change context variable. Setting these once at startup is faster than recalculating them on every screen.
// App OnStart
Set(varCurrentUser, User());
ClearCollect(
  colITTeamEmails,
  { Email: "t.reeves@contoso.co.uk" },
  { Email: "s.obi@contoso.co.uk" },
  { Email: "m.webb@contoso.co.uk" },
  { Email: "a.patel@contoso.co.uk" },
  { Email: "p.mehta@contoso.co.uk" }
);
Set(varIsITTeam, varCurrentUser.Email in colITTeamEmails.Email);
Set(varSelectedChange, Blank());

Beginner Tip

Why hardcode the IT team emails? Power Apps does not have a reliable built-in function to check Microsoft 365 group membership. The hardcoded collection is the pragmatic solution for a learning build. In production, you would use a SharePoint list of IT team members or a custom connector. This is documented as KE-003 in the Support stage.

Screen 1 — Home Dashboard

Build instructions

  1. 1.Add a header label: "IT Change Management". Set Fill to hsl(var(--dtod-navy)) equivalent (dark navy). Set Color to White.
  2. 2.Add a "My Open Changes" gallery. Set Items: SortByColumns(Filter(Changes, RequesterEmail = varCurrentUser.Email, Status <> "Closed", Status <> "Cancelled"), "Created", Descending). Show: ChangeID, Title, Status badge, Risk badge.
  3. 3.Add a risk colour indicator rectangle in the gallery. Set Fill: If(ThisItem.Risk = "Critical", RGBA(220,38,38,1), ThisItem.Risk = "High", RGBA(245,158,11,1), ThisItem.Risk = "Medium", RGBA(59,130,246,1), RGBA(34,197,94,1)).
  4. 4.Add a "New Change" button. Set OnSelect: Navigate(NewChangeScreen, ScreenTransition.Fade).
  5. 5.Add a "View All My Changes" button. Set OnSelect: Navigate(MyChangesScreen, ScreenTransition.Fade).
  6. 6.Add IT team pipeline summary (visible only when varIsITTeam = true). Add 5 labels showing CountIf(Changes, Status = "Draft"), CountIf(Changes, Status = "Assessment"), CountIf(Changes, Status = "Approval"), CountIf(Changes, Status = "Scheduled"), CountIf(Changes, Status = "Implementation").
  7. 7.Add a "Change Queue" button (visible only when varIsITTeam = true). Set OnSelect: Navigate(ChangeQueueScreen, ScreenTransition.Fade).

Screen 2 — New Change

Build instructions

  1. 1.Add a header label: "New Change Request".
  2. 2.Add TextInput controls for: Title (max 150 chars), Description (multiline), Reason (multiline), Business Justification (multiline), Implementation Plan (multiline), Test Plan (multiline), Rollback Plan (multiline).
  3. 3.Add character count labels under each multiline field: Len(DescriptionInput.Text) & " characters (minimum 50)".
  4. 4.Add Dropdown controls for: Service (Items: ["Finance System","CRM","HR System","Infrastructure","Network","Email","SharePoint","Power Platform","Security","Other"]), Change Type, Impact, Likelihood.
  5. 5.Add a Toggle for Affects Personal Data. Label: "Does this change affect personal data processing?"
  6. 6.Add read-only labels for Requester Name (varCurrentUser.FullName) and Requester Email (varCurrentUser.Email).
  7. 7.Add a Submit button. Set DisplayMode: If(!IsBlank(TitleInput.Text) && Len(TitleInput.Text) >= 5 && Len(DescriptionInput.Text) >= 50 && Len(ReasonInput.Text) >= 30 && !IsBlank(BusinessJustInput.Text) && !IsBlank(ServiceDropdown.Selected.Value) && !IsBlank(ChangeTypeDropdown.Selected.Value) && !IsBlank(ImpactDropdown.Selected.Value) && !IsBlank(LikelihoodDropdown.Selected.Value) && Len(ImplPlanInput.Text) >= 100 && Len(TestPlanInput.Text) >= 50 && Len(RollbackPlanInput.Text) >= 100, DisplayMode.Edit, DisplayMode.Disabled).
  8. 8.Set Submit button OnSelect: Patch(Changes, Defaults(Changes), { Title: TitleInput.Text, Description: DescriptionInput.Text, Reason: ReasonInput.Text, BusinessJustification: BusinessJustInput.Text, Service: ServiceDropdown.Selected.Value, ChangeType: ChangeTypeDropdown.Selected.Value, Impact: ImpactDropdown.Selected.Value, Likelihood: LikelihoodDropdown.Selected.Value, AffectsPersonalData: PersonalDataToggle.Value, ImplementationPlan: ImplPlanInput.Text, TestPlan: TestPlanInput.Text, RollbackPlan: RollbackPlanInput.Text, RequesterName: varCurrentUser.FullName, RequesterEmail: varCurrentUser.Email, Status: "Draft" }); Navigate(HomeScreen, ScreenTransition.Fade); Notify("Change request submitted successfully.", NotificationType.Success).

Screen 3 — My Changes

Build instructions

  1. 1.Add a status filter Dropdown. Items: ["All","Draft","Assessment","Approval","Scheduled","Implementation","Successful","Failed","Backed Out","PIR","Closed","Cancelled"]. Default: "All".
  2. 2.Add a gallery. Items: SortByColumns(Filter(Changes, RequesterEmail = varCurrentUser.Email, If(StatusFilter.Selected.Value = "All", true, Status = StatusFilter.Selected.Value)), "Created", Descending).
  3. 3.Each gallery card: ChangeID, Title, Status badge, Risk badge, PlannedStart (if not blank: "Planned: " & Text(ThisItem.PlannedStart, "dd mmm yyyy HH:MM")).
  4. 4.Set gallery OnSelect: Set(varSelectedChange, ThisItem); Navigate(ChangeDetailsScreen, ScreenTransition.Fade).

Screen 4 — Change Details

Build instructions

  1. 1.Display all change fields from varSelectedChange in read-only labels.
  2. 2.Status badge: coloured rectangle + label. Risk badge: coloured rectangle + label.
  3. 3.IT team action buttons (Visible: varIsITTeam). Show the appropriate button for the current status:
  4. 4. — Status = "Draft": "Advance to Assessment" button. OnSelect: Patch(Changes, varSelectedChange, { Status: "Assessment" }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: "Draft", NewStatus: "Assessment", ChangedBy: varCurrentUser.Email, ChangedDate: Now() }); Set(varSelectedChange, LookUp(Changes, ID = varSelectedChange.ID)); Notify("Status updated to Assessment.", NotificationType.Success).
  5. 5. — Status = "Assessment": "Open Assessment" button. OnSelect: Navigate(AssessmentScreen, ScreenTransition.Fade).
  6. 6. — Status = "Approval": "View Approval Status" button. OnSelect: Navigate(ApprovalStatusScreen, ScreenTransition.Fade).
  7. 7. — Status = "Scheduled": "Begin Implementation" button. OnSelect: Patch(Changes, varSelectedChange, { Status: "Implementation", ActualStart: Now() }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: "Scheduled", NewStatus: "Implementation", ChangedBy: varCurrentUser.Email, ChangedDate: Now() }); Set(varSelectedChange, LookUp(Changes, ID = varSelectedChange.ID)).
  8. 8. — Status = "Implementation": "Record Outcome" button. OnSelect: Navigate(ImplementationScreen, ScreenTransition.Fade).
  9. 9. — Status = "Successful" or "Failed" or "Backed Out": "Complete PIR" button. OnSelect: Navigate(PIRScreen, ScreenTransition.Fade).
  10. 10. — Status = "PIR": "Close Change" button. OnSelect: Patch(Changes, varSelectedChange, { Status: "Closed" }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: "PIR", NewStatus: "Closed", ChangedBy: varCurrentUser.Email, ChangedDate: Now() }); Set(varSelectedChange, LookUp(Changes, ID = varSelectedChange.ID)).
  11. 11.Change history gallery at the bottom. Items: Filter(ChangeHistory, ChangeRef = varSelectedChange.ChangeID). Sorted by ChangedDate ascending.

Screen 5 — Assessment

Build instructions

  1. 1.Display current Impact and Likelihood from varSelectedChange (read-only).
  2. 2.Add Override Impact Dropdown (optional). Default: varSelectedChange.Impact.
  3. 3.Add Override Likelihood Dropdown (optional). Default: varSelectedChange.Likelihood.
  4. 4.Add a Calculated Risk label. Text: Switch(OverrideImpactDropdown.Selected.Value & "|" & OverrideLikelihoodDropdown.Selected.Value, "Critical|High", "Critical", "Critical|Medium", "Critical", "Critical|Low", "High", "High|High", "Critical", "High|Medium", "High", "High|Low", "Medium", "Medium|High", "High", "Medium|Medium", "Medium", "Medium|Low", "Low", "Low|High", "Medium", "Low|Medium", "Low", "Low|Low", "Low", varSelectedChange.Risk).
  5. 5.Add Approver Person picker.
  6. 6.Add Assessment Notes TextInput.
  7. 7.Add "Advance to Approval" button. OnSelect: Patch(Changes, varSelectedChange, { Impact: OverrideImpactDropdown.Selected.Value, Likelihood: OverrideLikelihoodDropdown.Selected.Value, Risk: CalculatedRiskLabel.Text, Approver: { DisplayName: ApproverPicker.Selected.DisplayName, Email: ApproverPicker.Selected.Email }, Status: "Approval" }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: "Assessment", NewStatus: "Approval", ChangedBy: varCurrentUser.Email, ChangedDate: Now(), Note: AssessmentNotesInput.Text }); Set(varSelectedChange, LookUp(Changes, ID = varSelectedChange.ID)); Navigate(ChangeDetailsScreen, ScreenTransition.Fade).
  8. 8.Add "Return to Requester" button. Requires a rejection note TextInput. OnSelect: Patch(Changes, varSelectedChange, { Status: "Draft" }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: "Assessment", NewStatus: "Draft", ChangedBy: varCurrentUser.Email, ChangedDate: Now(), Note: RejectionNoteInput.Text }); Navigate(ChangeDetailsScreen, ScreenTransition.Fade).

Screen 6 — Approval Status

Build instructions

  1. 1.Display change summary: ChangeID, Title, Risk badge, Planned Start.
  2. 2.Display Implementation Plan in full (scrollable TextInput, read-only).
  3. 3.Display Rollback Plan in full (scrollable TextInput, read-only, amber background).
  4. 4.Add Approval Decision Dropdown: Approved / Rejected. Visible: varCurrentUser.Email = varSelectedChange.Approver.Email || varIsITTeam.
  5. 5.Add Decision Note TextInput (required).
  6. 6.Add "Record Decision" button. OnSelect: Patch(Changes, varSelectedChange, { ApprovalDecision: ApprovalDecisionDropdown.Selected.Value, ApprovalNote: DecisionNoteInput.Text, ApprovalDate: Now(), Status: If(ApprovalDecisionDropdown.Selected.Value = "Approved", "Scheduled", "Draft") }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: "Approval", NewStatus: If(ApprovalDecisionDropdown.Selected.Value = "Approved", "Scheduled", "Draft"), ChangedBy: varCurrentUser.Email, ChangedDate: Now(), Note: DecisionNoteInput.Text }); Set(varSelectedChange, LookUp(Changes, ID = varSelectedChange.ID)); Navigate(ChangeDetailsScreen, ScreenTransition.Fade).

Screen 7 — Implementation

Build instructions

Rollback Plan Must Be Prominent

The Rollback Plan must be the most visually prominent element on this screen. Use an amber background, a bold heading, and a large font. The implementer must be able to find it instantly under pressure.
  1. 1.Display Implementation Plan in full (scrollable, read-only, blue background).
  2. 2.Display Rollback Plan in full (scrollable, read-only, amber background, bold heading "ROLLBACK PLAN").
  3. 3.Add Implementation Notes TextInput (multiline).
  4. 4.Add Outcome Dropdown: Successful / Failed / Backed Out.
  5. 5.Add "Record Outcome" button. DisplayMode: If(!IsBlank(OutcomeDropdown.Selected.Value), DisplayMode.Edit, DisplayMode.Disabled). OnSelect: Patch(Changes, varSelectedChange, { ActualEnd: Now(), Outcome: OutcomeDropdown.Selected.Value, ImplementationNotes: ImplNotesInput.Text, Status: OutcomeDropdown.Selected.Value }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: "Implementation", NewStatus: OutcomeDropdown.Selected.Value, ChangedBy: varCurrentUser.Email, ChangedDate: Now() }); Set(varSelectedChange, LookUp(Changes, ID = varSelectedChange.ID)); Navigate(ChangeDetailsScreen, ScreenTransition.Fade).

Screen 8 — PIR

Build instructions

  1. 1.Display change summary: ChangeID, Title, Outcome badge, Actual Start, Actual End.
  2. 2.Add PIR Objective Achieved Dropdown: Yes / Partially / No.
  3. 3.Add Unexpected Impacts TextInput (multiline).
  4. 4.Add Lessons Learned TextInput (multiline).
  5. 5.Add "Complete PIR" button. DisplayMode: If(!IsBlank(PIRObjectiveDropdown.Selected.Value), DisplayMode.Edit, DisplayMode.Disabled). OnSelect: Patch(Changes, varSelectedChange, { PIRObjectiveAchieved: PIRObjectiveDropdown.Selected.Value, PIRUnexpectedImpacts: PIRImpactsInput.Text, PIRLessonsLearned: PIRLessonsInput.Text, Status: "PIR" }); Patch(ChangeHistory, Defaults(ChangeHistory), { ChangeRef: varSelectedChange.ChangeID, OldStatus: varSelectedChange.Status, NewStatus: "PIR", ChangedBy: varCurrentUser.Email, ChangedDate: Now() }); Set(varSelectedChange, LookUp(Changes, ID = varSelectedChange.ID)); Navigate(ChangeDetailsScreen, ScreenTransition.Fade).

Pin the App to Microsoft Teams

  1. 1.In Power Apps Studio, select Publish. Confirm the publish.
  2. 2.Navigate to Microsoft Teams. Open the IT Changes channel.
  3. 3.Select + (Add a tab) at the top of the channel.
  4. 4.Search for Power Apps. Select the Power Apps connector.
  5. 5.Select the IT Change Management App from the list.
  6. 6.Name the tab: IT Changes. Select Save.
  7. 7.Verify the app loads correctly in the Teams tab.

Stage Complete — What You Now Have

  • ✓App OnStart: global variables, IT team collection, role check
  • ✓8 screens: Home Dashboard, New Change, My Changes, Change Details, Assessment, Approval Status, Implementation, PIR
  • ✓Key formulas: risk colour, submit validation, status transitions, Patch + ChangeHistory
  • ✓App published and pinned as a Teams tab in the IT Changes channel

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