All Content
Timespan
explore our new search
Improve Power Apps UI/UX like SharePoint (Part 3)
Power Apps
Oct 30, 2023 3:00 PM

Improve Power Apps UI/UX like SharePoint (Part 3)

by HubSite 365 about Andrew Hess - MySPQuestions

Currently I am sharing my knowledge with the Power Platform, with PowerApps and Power Automate. With over 8 years of experience, I have been learning SharePoint and SharePoint Online

Citizen DeveloperPower AppsPower SelectionLearning Selection

This is part 3 of our SharePoint App, and we got over many different ways to Patch. When you start writing your Patch statements

This is part 3 of our SharePoint App, and we got over many different ways to Patch. When you start writing your Patch statements you should think of it like a Power Automate,

What is your Trigger? Is it a Button Click, is it the OnChange property? What causes the Patch?

Then you should think about the Action, are you Patching Everything? Do you want a Collection and ask the users with a popup, if this is what they want to Patch? Do you want to Patch just 1 Line Item? Do you want to Patch each Column individually?

These options are all up to you, and depend on your UX of your app.

Chapters:

  • 0:00 Introduction
  • 1:05 Patching from OUTSIDE the Gallery
  • 2:16 Writing a New Line Item from outside the Gallery
  • 3:00 Patching from INSIDE the Gallery
  • 4:03 Using FORALL to Patch
  • 5:21 Using a COLLECTION to Patch
  • 7:55 Using FORALL with the COLLECTION
  • 9:15 Patching ONCHANGE
  • 11:30 Patching only when CHECKBOX is true
  • 14:21 Conclusion

The Patch function in Power Apps can be used to create, update, or merge records in a data source or a record variable². There are different ways to use the Patch function depending on your needs¹.

Some examples are:

  • To create a new record with Power Apps Patch function syntax: Patch( Customers, Defaults( Customers ), { Name: "Contoso" } )²
  • To update an existing record using Power Apps Patch function syntax: Patch( Customers, First( Filter( Customers, Name = "Contoso" ) ), { Phone: "555-1212", City: "Seattle" } )²
  • To get the result of the Patch function syntax: Set( ResultRecord, Patch( Customers, Defaults( Customers ), { Name: "Contoso" } ) )¹
  • To create multiple new records with Power Apps Patch function syntax: Collect( Customers, { Name: "Contoso", Phone: "555-1212", City: "Seattle" }, { Name: "Fabrikam", Phone: "555-3434", City: "New York" } )¹

Power Platform Community · Shane Young · Apr 10, 2018

I know I need an OnSelect collect action for the toggle and a Patch on a button. ... Message 3 of 10 ... @gabibalaban, and what should the PATCH look like?