Today’s learning on Patch is to demonstrate that sometimes we don’t have to use Patch at all, and that Forms can be created in a way that gives the control of positioning the objects, but “performance” of submitting of forms
This is the last day in the series on Patch, so I’ve provided links to all the sessions down below.
An Alternative to Patch
The technique is relatively straightforward to execute.
Create all your controls, text inputs etc and place them wherever you wish onto the canvas
Create a form tied to your data source
Connect the outputs of your controls on your canvas to your form inputs so that the default is the value in your forms
Create a button on your canvas
In the OnSelect of the button use the following formula
You can now hide the form.
There are some points to note from this technique:-
You would need to put a little more effort into your “on canvas” controls to ensure that if you had a gallery their defaults would be correctly set. This is no different to what would be the case with the experience when patching
Troubleshooting submission issues is easier than with Patch
You have more options around controlling the behaviour of the input s
How to get to the course content
Check out this post to confirm how to sign up for the course.
Today’s learning on Patch is important as it relates to using a Patch statement to create multiple items. This is a MAJOR difference between Forms and Patch as Forms cannot perform this operation.
Structure for Patching to a Multiple items using Power Fx
The basic structure for patching multiple items is as follows – where CityXL is a data source within our app, and Cities is a table within Dataverse (Common Data Service). In this case the field names are completely aligned between the spreadsheet table field and the database fields, which is why they repeat themselves :-
Today’s learning on Patch is important as it relates to Person fields which are more similar than you might think. They are highly relevant to Patching to Sharepoint lists as they help us to maintain the ties to related lists.
Structure for Patching to a Person Field
The basic structure for patching to a person field is as follows – where cmbOwner is a combo box where a user is selected:-
Today’s learning on Patch is important as it relates to Lookup and Choice fields which are more similar than you might think. They are highly relevant to Patching to Sharepoint lists as they help us to maintain the ties to related lists.
If you’ve signed up for the course you can head directly to the first video here.
I avoided using Power Apps Patch for a very very long time. I didn’t understand it. It stressed me out, so I left it alone. When I prepared my course on Power Apps from Zero to Hero, it was obvious to me that I was missing the Patch function in a BIG way, so I wrote a whole module on it and it’s coming very soon, and how soon is up to you.