Stage 8 of 17
Build the Software Licence Management Canvas Power App. 8 screens: Dashboard, Products, Agreements, Licence Details, Allocations, Renewals, New Allocation, and Compliance Report.
Why Are We Doing This?
// Load all data into collections
ClearCollect(colProducts, Products);
ClearCollect(colSuppliers, Suppliers);
ClearCollect(colAgreements, Agreements);
ClearCollect(colAllocations, Allocations);
// Set permission variables
Set(varITEmails, ["tom.reeves@contoso.com", "james.okafor@contoso.com", "priya.mehta@contoso.com"]);
Set(varFinanceEmails, ["sandra.obi@contoso.com"]);
Set(varIsIT, User().Email in varITEmails);
Set(varIsFinanceOrIT, varIsIT Or User().Email in varFinanceEmails);
// Navigate to Dashboard
Navigate(scrDashboard);
Hardcoded Email Lists
The central calculation — used on every screen that shows cost
// AnnualisedCost formula (used in gallery items and KPI cards)
If(
ThisItem.BillingFrequency = "Monthly",
ThisItem.UnitCost * ThisItem.QuantityPurchased * 12,
If(
ThisItem.BillingFrequency = "Annual",
ThisItem.UnitCost * ThisItem.QuantityPurchased,
ThisItem.UnitCost * ThisItem.QuantityPurchased / 3
)
)
Verification examples from sample data
These values are calculated in the Power App, not stored in SharePoint. Calculate them per agreement row in the gallery using a local variable or inline formula.
// In the gallery — per row calculation
// QuantityAllocated label Text property:
CountRows(Filter(colAllocations, Agreement.Id = ThisItem.ID, Status = "Active"))
// QuantityAvailable label Text property:
ThisItem.QuantityPurchased - CountRows(Filter(colAllocations, Agreement.Id = ThisItem.ID, Status = "Active"))
// QuantityAvailable colour (red if negative, amber if at threshold, green otherwise):
With(
{ qty: ThisItem.QuantityPurchased - CountRows(Filter(colAllocations, Agreement.Id = ThisItem.ID, Status = "Active")),
threshold: Max(1, Round(ThisItem.QuantityPurchased * 0.1, 0)) }
,
If(qty < 0, RGBA(220,38,38,1), If(qty <= threshold, RGBA(245,158,11,1), RGBA(34,197,94,1)))
)
Performance Note
scrDashboard — Dashboard
scrProducts — Products
scrAgreements — Agreements
scrLicenceDetails — Licence Details
scrAllocations — Allocations
scrRenewals — Renewals
scrNewAllocation — New Allocation Form
scrComplianceReport — Compliance Report
Need more help with the concepts?
Visit DosToDigital for guides, templates, and deeper explanations.