Power Apps: formulas, search and sharing
Your app filters, checks input, marks returns and runs for a colleague.
1 Learn
Work through the modules in order and tick them off here. Microsoft Learn keeps track of your progress if you are signed in there.
2 Practise: Search, return and sharing
You do the exercise on a computer. If you are reading on your phone, take your progress along.
- Add a search box above the gallery and filter by device.
- Add a filter by status. If the search box is empty, the gallery shows everything.
- Build a "Returned" button that uses Patch() to set the status to "Returned".
- Show a message in the form when "Until" is before "From".
- Share the app with a colleague and give her access to the list. Let her add an entry.
If you get stuck
- Patch() reports an error on the status: "Status" is a choice column and expects a record. In the gallery button it looks like this: Patch('Equipment loans', ThisItem, {Status: {Value: "Returned"}})
- The search finds nothing: check that the gallery's "Items" property uses Filter() with StartsWith() on the device column. If the search box is empty, StartsWith() shows all entries.
Done when your colleague has added an entry herself and searching for a device shows only matching entries.
If nobody is available right now: check under "Share" in Power Apps that the person is listed, and in SharePoint that they can edit the list. Let them add the entry as soon as they are there.
Matching tips
- #PowerPlatformTip 23: Filter Blank
- #PowerPlatformTip 33: Coalesce in Power Apps
- #PowerPlatformTip 63: Mastering the Lookup Function
- #PowerPlatformTip 48: Sharing of Flows & Power Apps
Helpful tools
3 Self-test
Answer each question in your head or on paper first, then open the answer. Recalling sticks better than rereading.
What does Filter() return?
All records of a table that meet a condition.
When do you use Patch() instead of a form?
When you want to change a record directly with a formula, for example with a button, without anyone filling in a form.
Why do German examples use a semicolon between arguments?
With language settings that use a comma as decimal separator, Power Fx separates arguments with a semicolon and chains formulas with two semicolons.
Your colleague opens the app but sees no data. What is the usual cause?
She has the app but no access to the SharePoint list. Sharing the app does not grant access to the data.
From week 2: where do you change which column a gallery row shows?
In the Text property of the label in the gallery, for example ThisItem.Until. The data itself stays in the SharePoint list.
4 Connect
Stuck? Write to your Sensei or bring the question to the user group. The Power Platform User Group Deutschschweiz (German-speaking Switzerland) meets online every two weeks on Friday from 1 to 2 pm, free and in German.