3. Use Excel-like formulas – not code
To do Formula
“Next” button to change screen Navigate(MyScreen, ScreenTransition.Fade)
Add item to SharePoint list Patch(MySharePointList, Defaults(MySharePointList),
{
FirstName:TextInput1.Text,
LastName:TextInput2.Text
}
)
Add record to local collection
(cache)
ClearCollect(
SelectedProducts,
{
ID: ProductID,
Name: ”XT1000”
}
)
17. Functions for SharePoint data
Patch
• Add list item
Collect
• Fetch list item
Update
• Update list item
Delete
• Remove
Multi-page forms
Person/Group fields
Taxonomy fields
20. Working with data
Connection is hit when:
Data-related functions:
Connection (e.g.
a database)
Data source
(e.g. a table)
21. Using a Gallery control for navigation
Complex at first
The pattern
22. Tips – key PowerApps functions
To do Use
Set a global variable available across all screens Set()
Set a context variable in a single screen UpdateContext()
Change screen Navigate(), Back()
Save a local record (e.g. for offline) Collect(), ClearCollect(), SaveData()
Open a web address/app Launch()
Get data on current user User()
150+ functions in total. See:
https://docs.microsoft.com/en-
us/powerapps/formula-reference
23. Tips
Get used to:
Lots of fiddly work to generate PATCH command
Adding a “debug screen” with labels showing variables etc
General weirdness with variables
Variables and If statements
NOT: OnLoad - If (X) { Label1.Visible = true } else { Label1.Visible = false }
INSTEAD: Label1.Visible = if (X, false, true)
Conditional display
Add a “rule” to control, use panel to configure what properties which should be set (e.g. Visible = false)
24. Tips – SharePoint fields
To do Use
Update a choice/lookup from a
dropdown
Paternity_LengthOfPaternityLeave: {
'@odata.type':"#Microsoft.Azure.Connectors.
SharePoint.SPListExpandedReference",
Value: ddlPaternityLeaveDuration.Selected.Value,
Id: 1
}
Update a person field currentUser: {
'@odata.type':"#Microsoft.Azure.Connectors.
SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Lower(User().Email),
Email:User().Email,
JobTitle:".",
Picture:"."
}
28. Takeaways
PowerApps can be VERY transformative for an org with lots of forms/processes
Very easy to get apps onto mobile devices
But, some pain for the implementer! Often
beyond the average power user
1
2
3
“Simple” requirements can sometimes be
difficult to implement
4
29. Thank you
Any questions?
www.sharepointnutsandbolts.com
@ChrisO_Brien