Canvas Apps in Power Apps: build a data entry application
João Barros
04 de November de 2024
1 min read
Canvas Apps are drag-and-drop applications in Power Apps where the maker controls the layout pixel by pixel. They are the right choice for custom mobile apps, complex forms and replacing Excel-based processes.
Create and connect to a data source
1. make.powerapps.com → Create → Blank canvas app (tablet/phone)
2. View → Data sources → Add data → SharePoint
→ Select site and list: "Incident_Records"
3. The list becomes available as: Incident_Records
Gallery bound to the source
Control: Vertical gallery
Items (property): SortByColumns(
Filter(Incident_Records, Status = ddStatus.Selected.Value),
"Title", Ascending
)
// ddStatus = DropDown with options: "All","Open","Closed"
// If ddStatus = "All", show everything:
Items: If(
ddStatus.Selected.Value = "All",
Incident_Records,
Filter(Incident_Records, Status = ddStatus.Selected.Value)
)
Edit form
Control: Edit Form (frmEdit)
DataSource: Incident_Records
Item: gal.Selected // item selected in the gallery
// Save button:
OnSelect: If(
SubmitForm(frmEdit),
Notify("Saved successfully!", NotificationType.Success),
Notify("Error saving.", NotificationType.Error)
)
// New record button:
OnSelect: NewForm(frmEdit); Navigate(scrForm)
Essential Power Fx formulas
// Combined filter (text + dropdown)
Filter(
Customers,
(txtSearch.Text = "" || StartsWith(Name, txtSearch.Text)) &&
(ddRegion.Selected.Value = "All" || Region = ddRegion.Selected.Value)
)
// Calculate days since creation
DateDiff(ThisItem.Created, Now(), TimeUnit.Days)
// Navigate between screens with context
Navigate(scrDetail, ScreenTransition.Fade, {selectedItem: ThisItem})
Conclusion
A well-built Canvas App replaces Excel-and-email processes with an auditable application, accessible on mobile and integrated with SharePoint or Dataverse. Invest time in the user experience — well-named controls and intuitive navigation dramatically increase adoption.