I watched/read a dozen explanations on how to do this before finally finding my way here. This is the first example that made everything perfectly understandable to mere mortals. Thank you.
Hey Shane, this is a great return to the basics for the new generation of Power Apps users! Perhaps, for a follow-up video, you can discuss steps that can be taken to prevent duplicate entries in a datasource when using the Patch function. Thanks for all you do!
Every time I watch your videos. I think, what a great explanation. Shane, thank you for everything, appreciate you so much. Your knowledge, your explanations and your humour. Thanks mate, you’re a star !
what a awesome video Shane, I finally starting to get the hang of the patch function, all thanks to your video tutorial. I managed to create my own form, which is a milestone for me, I did however wanted to add attachments as our sales reps would like to add photos or video clips, so I added a new form, deleted all the fields, and kept attachments, then added 'editform'.updates after the curly brackets and closed the patch. works like a charm thank you very much.
Thanks for this helpful video Shane! I just have a question. Is it possible for PowerApps to record different time stamps based on user editing the form? I have a Productivity App which records the Start and End time; however, I also need to catch the time the user goes back to that record to edit and record the time they spent on editing that record which can happen multiple times.
Great video Shane, just a quick question. is it possible to put check boxes on the itens and update multiple itens with a singular information? like for an example i have a bunch of itens that are in a gallery and i want to update the arrive date for them, is it possible to set up patch to do all of them at once?
I enjoyed the video very much and was able to successfully patch new records to my SP List. Still looking for one last piece that is going to seem strange at first glance. My SP List will have the same Barcode value listed multiple times as I don't want to overwrite the information from the previous update. The problem I'm having is finding a way for it to show me the latest record input when the barcode is scanned again. It continues to pull the original record. Is there a way to call up the current record on each subsequent scan? Thanks!
I rebelliously made my first 2 apps in production using Forms and Submit even though I found out quite early Shane prefers Patch over them. Now, I've decided to step down from the barricades and use the patch function, because it will allow me to create much more user-friendly input screen and help me adjust the visualization of everything. Though if this doesn't serve my purpose I am going back to Forms and Submit. To be continued.
Very informative video! One question though. How was the "employee" Sharepoint list created? I tried to create an employee directory list from the Office 365 Users connector, but with no success. Can you advice whether this can be done? Thanks.
I built the Employee list in SharePoint starting with a blank list and adding rows and columns. I am not pulling it from AD directly. You could fetch that info but I don't have a video on that.
It will be very welcome if you can do one on creating a Sharepoint staff list from the Office 365 user directory and a Power app on that too. So far I have not seen any informative video on that yet. There are man uses for such apps.
Shane this is a great training and very easy to follow. I am hoping you have another one that addresses what I am trying to do but can't find. I am using the standard form templates and need the ability to effectively load a record, edit it and save as a new one. I can't seem to figure out how to do that. Do you have any suggestions? Thank you in advance.
Thanks ! So, if I have a DropDown control (related to another SP list) in my form, I can't use SubmitForm, but Patch only ? Correct ? Or perhaps to use SubmitForm for populating MOST of the fields and THEN Patch to fill this ONE DropDown (related to another SP list). Feasible or not ?
As a Power Apps Newbie, this is a great easy to follow video. I'm assuming that using patch will make using a SQL view for display and then using the underlying table to save easier?
Thanks for this Shane. Saving changes using a form has the OnSuccess event to let you know that the save went ok. Is the absence of an error the only way to know a patch worked?
Hi Shane, thank you for the video. I am trying to patch a collection into a dataverse table based on the matching lookup column from the table and a column in the collection. This is not working properly. Anything am doing wrong? Thank you.
Hey Shane, do you have any video on containers and it uses? we do create responsive apps without containers right, nowadays every now and then in youtube people are adding containers in powerapps, there are 3 types of it, why should we use? what is the exact use of it
Hi Shane, Really nice video, thank you!! I want to upload image from power apps to my sharepoint column Image and view it as well in power apps, how can i do that? Thanks in advance.
Hi Shane. If using SQL Server for this demo, just a reminder that the table in the database has to have a Primary Key which has Identity turned ON, for the button to work adding a new record.
Is it good practice to add a timer when patching a text input? I have a text input with the patch set on the "onchange" Property and its of course trying to patch after each character is typed. How annoying. hehe. My research has led me to the timer solution but I was curious if you agreed or not.
YOu could do that. Typically I don't like to Patch OnChange for the exact Chaos you mention. Setting DelayOutput to true will help but I would make the users click Save, if not you are just asking for trouble. :) If you do stick with OnChange then include a loading spinner th-cam.com/video/UWy5I_MuIgU/w-d-xo.html so they can't make any changes until the first one saves.
I went with your advice and set all patch statements to one button. Then I added a nice little spinner to watch while it runs and set the image to go invisible when its not running. Thanks a bunch!@@ShanesCows
@@MichaelDeBlasis1369 Awesome. While your users don't think it is ideal, it will make the app most stable and performant, which they do actually care for. 🤩🤩
I would love to also add a way to track changes and make the save button a different color when changes are detected. As well as notify the users when they don't save data and attempt to navigate away. And I WILL figure it out somehow. haha. THats my self handed project this week. Try and make that a reality because it just seems cool to do.
Just a quick question. I had to do a patch to a SharePoint OnPrem list throug a gateway. Text, and date columns worked just fine, but choice and lookup columns just blowed up. I tried build the 100% same patch on my own SP Online envirorment, and everything went smooth. Have you tried something similar? Ended up using a form to avoid the errors.
Hi Shane, i'm working on an app for practice purposes and i used a patch to submit a form and I tried to use the OnSuccess property to send an email notification but it doesn't work. Could you please give out pointers on how to go about!?
If you Patch from a form you are not submitting the form so OnSuccess will not trigger. You would need to add the Send Email after the Patch. Patch(....); SendEmailv2(...) Something like that.
Hi - great videos! Thank you. I had a question. I have a shopping cart type app (thanks to another one of your videos). The initial screen is a gallery populated from one datasource (catalog) that is a SP list. I want users to select an item and 'navigate' to the next screen that is the actual order form which is connected to another SP list (datasource is shopping cart). The two datasources share several fields and I am trying to get the item name and quantity fields to populate on the form from the gallery. I do also have a collection that grabs that data and I've tried to use that. Nothing has worked. I've ever gotten error messages that datasources don't match or just no error but nothing moves to the next screen. So I guess I am looking for info on how to move data collected in a gallery from one datasource and move it to a form using another datasource. I hope that makes sense.
every time I use patch I always come back to your videos, this was great quick refresher - thanks. Is it possible to use patch to reset a value to a default one or null a value? say remove a date in a record to null?
With the View and Edit form, I find it hard to change the look and feel. Do you suggest using the Patch function so that we can have an easier option to design fields? Appreciate your input.
How would you patch to a different data source, though? In my case (after watching), I got everything set up and working. I added a "complete task" button with onselct to remove the item from my sharepoints list. I would like to add this removed item to a different sharepoints list to retain the completed items. How would I patch the item to the different sharepoints list using the same button I mentioned. I did try on my own, and I keep getting a "network error field title is required."
Hi - I would love to see a video (if one doesn’t already exist) - on best practice when dealing with both new items and editing existing items. What’s the default property of the input controls? How do you toggle between showing the selected items’ value when editing and blank them when creating new records?
Could you explain how to add a line to patch something that is a drop down/searchable box? For example, I have a drop down box with the option to search for your supervisor name and have it linked to Office 365 data. How can I get this to patch and add the data entry into the Sharepoint list? Thank you
Patch(logichere);Whatever you want to do when the Patch is done. 😎 Bonus: Set(varRecord, Patch(LogicHere)) That would do the Patch and save the record to the variable varRecord. That would be the same as Form.LastSubmit
Hello Shane, perfectly explained, thank you so much ;-) Patching an existing item with "Gallery.Selected" works fine, but is there an easy way to patch an existing item based on for example ID or Name? Thank you ;-)
13:24 I wonder if it's still possible to update the records in the gallery, when using Collect function rather than Patch function? Collect function doesn't have a field to allow us to type "Defaults(Employees)" like there's in the Patch function. That's why I find it a little bit tricky to determine where and how to use it.
@ShaneCows thank you so much for all the videos, you help us so much with all of them. I do have a very basic (probably stupid) question that every time I'm creating something in Power Apps I struggle to understand the diference. In the very beginning of your Patch formula explanation you add the record Title and then you added First Name. Why First Name is in between single quotes and Title is not? And when it comes to Age again no single quotes... it's confusing for a young padawan like me 😞
If the field name you are using has a space you need the quotes. SO: Title 'Title with a space' FirstNameNoSpace 'First name with spaces' That is it. :)
Hi Shane, I'm trying to patch 3 columns, they all have links, I did this but it only patches the first one, any idea on how to get all 3 patched? Thanks!!! Patch('SP List', Defaults('SP LIST'), {'Title': DataCardValue18.Text, 'Column 1': RichTextEditor2.HtmlText, 'Column 2':DataCardValue31.HtmlText, 'Column 3':RichTextEditor1.HtmlText} )
Good video. In terms of patching a SQL data source. How do you handle SQL table primary keys which are auto numbers when creating a new record? Also, the not null fields, I guess they could be given a default value when creating a new record.
I do not patch when using SQL. I make sure my SQL data table has a primary key. Then I use the new app function, use SQL and then let it automatically create a three screen app. I do however use patch with SQL data if I am creating adding an editable table to the app I just created.
Thanks for the response I've learnt so much since I posted that. I've since learnt how to patch, and it is now straight forward for me. One problem I'm having though is that one table is not patching because the user does not have permission to add a new row to a table. It is only one table, and the other tables are fine. Using the set var for a common person identifier across tables and for this reason Power Apps treated it as a handled error with no warning that one table was not getting patched. I used Shane's example code to get Power Apps to show the handled network error. So now I'm working out how to ensure users have the necessary permissions to tables so that this does not happen. @@bartleymollohan1090
I love the patch function. I know that this is indirectly related to patch, but when I do in gallery editing with onChange patching, the selected field (focus) will jump to where ever it wants to after the data source has updated and the gallery receives it's data has changed refresh event. For the end user this is very disruptive. Since this is being done inside of a gallery, SetFocus does not work (boo). is there a way to keep or put the selected field back to the place that the user wanted it to go after the gallery goes thru it's datasource refresh?
How would you patch a pen input when submitting a form into a SharePoint list? And then be able to pull that peninput from the list into an email or pdf?
It’s not multi choice people picker it is 3 people picker with different values. I ran in to issue of having the first one being patched only all the time.
This is helpful, but didn't work for my current situation. OnSelect I want Status field to update, based on what was selected in a dropdown box. so basically If ddAppRej = Approve then update Status to Submitted for Processing and if ddAppRej = Reject then update Status to Rejected. And also, patch the Notes field data into the record. I could probably figure it out, but if you have another video to direct me that would help, please let me know.
Excellent video (as usual from SY...) but the REAL problem is that now (June 2023) all your excellent and useful videos on "How to Patch Complex columns" DOES NOT WORK ANYMORE!!! Could you plead help us with the new sintax?...please...
@@ShanesCowsNo, I didn't, but I did after your reply: It was exactly what I needed and it helped me solving my problem. Thank you, Shane: it is not by accident that you are "the Rockstar of Power Apps"!!! By the way my mistake was that I was working within a solution, but I did not put my data source (A Dataverse table) inside the same solution, as so0n as I imported the data source I was able to replicate your exercises. "Thank you and have a nice day!!
Hey Shane, Hope you are doing well, I have been trying to add a code to a Save Icon so that when selected it takes the form that I created to a different SharePoint List, but it has not been working ,I'm new to this Sharepoint powerapps area and Im just lost at this point Idk what function to go for i tried collect but was told it is wrong they told me to use patch function but i keep getting the record type issue
I am trying to do a very simple patch for a new item, and I keep getting "Network error when using the patch function. The requested operation is invalid." All I trying to do is patch text to a text column.
Sorry my question was not clear. I have one text input box that populates data(say parameter) from a table based on unique id selected by user. Then based on each parameter that got populated on the screen, user will input value for each parameter. Now each parameter is column name of the output table I want to load data. So I have to put condition like if parameter populated on screen = column name on table then patch the parameter value entered.
Can I patch from one list to another? I have a "parent" list with requests and a "child" list with comments with "title" as the key field. In a screen, I have a gallery that pulls an edit form from the "parent" and an edit (mode of new) for the "child" so a comment can be added. I can "form submit" the new comment, but I'd like to find a way to take some data from the "parent" to update the "child" so I can send an email to the person that created the "parent" item with the comment that someone puts in the "child" one. If you can understand what I just said, you win "Dawn translator of the year" :D Sometimes us low-coders get in a little over our heads!
Hi Shane, do you need to do something different, if your data source is an excel table, as opposed to a sharepoint list? I have been trying to replicate your formula for my excel table data source, but keep getting the error icon. Thank you Patch( NamingConventionTable3, Gallery1.Selected, {Status:"Test"} )
I watched/read a dozen explanations on how to do this before finally finding my way here. This is the first example that made everything perfectly understandable to mere mortals. Thank you.
Glad it helped!
Hey Shane, this is a great return to the basics for the new generation of Power Apps users! Perhaps, for a follow-up video, you can discuss steps that can be taken to prevent duplicate entries in a datasource when using the Patch function. Thanks for all you do!
How about this one Dave? 😎 th-cam.com/video/Ap3_Ea9H8b0/w-d-xo.html
@@ShanesCows Yup! I forgot about that one (even though I commented about it 😀)
Every time I watch your videos. I think, what a great explanation. Shane, thank you for everything, appreciate you so much. Your knowledge, your explanations and your humour. Thanks mate, you’re a star !
🤩 thank you. I really appreciate comments like this. They keep me going. Have a great week.
You saved my life with this video. I was struggling for days to update using a form, and it's using the GALLERY that's the trick. THANK YOU!!!!
Glad it helped!
what a awesome video Shane, I finally starting to get the hang of the patch function, all thanks to your video tutorial. I managed to create my own form, which is a milestone for me, I did however wanted to add attachments as our sales reps would like to add photos or video clips, so I added a new form, deleted all the fields, and kept attachments, then added 'editform'.updates after the curly brackets and closed the patch. works like a charm thank you very much.
Thanks for this helpful video Shane! I just have a question. Is it possible for PowerApps to record different time stamps based on user editing the form? I have a Productivity App which records the Start and End time; however, I also need to catch the time the user goes back to that record to edit and record the time they spent on editing that record which can happen multiple times.
Check out this video. th-cam.com/video/tNKcsuL72ks/w-d-xo.html I think it should get you going. :)
Great video Shane, just a quick question.
is it possible to put check boxes on the itens and update multiple itens with a singular information?
like for an example i have a bunch of itens that are in a gallery and i want to update the arrive date for them, is it possible to set up patch to do all of them at once?
Yes. Power Apps Select Multiple Items in A Gallery
th-cam.com/video/wpZbYPvPO68/w-d-xo.html
Great refresher on the fundamentals on Patching. I thoroughly enjoyed it. Thanks for sharing.
Glad you enjoyed it! I appreciate little comments like this, they keep me focused on good content. Thanks
I enjoyed the video very much and was able to successfully patch new records to my SP List. Still looking for one last piece that is going to seem strange at first glance. My SP List will have the same Barcode value listed multiple times as I don't want to overwrite the information from the previous update. The problem I'm having is finding a way for it to show me the latest record input when the barcode is scanned again. It continues to pull the original record. Is there a way to call up the current record on each subsequent scan? Thanks!
I rebelliously made my first 2 apps in production using Forms and Submit even though I found out quite early Shane prefers Patch over them. Now, I've decided to step down from the barricades and use the patch function, because it will allow me to create much more user-friendly input screen and help me adjust the visualization of everything. Though if this doesn't serve my purpose I am going back to Forms and Submit. To be continued.
If forms are working then stick with them. Don't change for me. 🤩
Always helping me with something. Thank you Shane!
Happy to help
Great video Shane! I'm having problems patching a SharePoint combobox, do you have any advice for me?? thank you!
I have a whole video on the "hard columns" th-cam.com/video/b4Fb57UsJLI/w-d-xo.html 😎
@@ShanesCows you’re awesome ✨
thank you Shane for this refresher video.
Happy to help!
Very informative video! One question though. How was the "employee" Sharepoint list created? I tried to create an employee directory list from the Office 365 Users connector, but with no success. Can you advice whether this can be done? Thanks.
I built the Employee list in SharePoint starting with a blank list and adding rows and columns. I am not pulling it from AD directly. You could fetch that info but I don't have a video on that.
It will be very welcome if you can do one on creating a Sharepoint staff list from the Office 365 user directory and a Power app on that too. So far I have not seen any informative video on that yet. There are man uses for such apps.
Shane this is a great training and very easy to follow. I am hoping you have another one that addresses what I am trying to do but can't find. I am using the standard form templates and need the ability to effectively load a record, edit it and save as a new one. I can't seem to figure out how to do that. Do you have any suggestions? Thank you in advance.
Jimmy like this? th-cam.com/video/_LbteL8oi5I/w-d-xo.html
Thank you@@ShanesCows
hi Shane, this is a great explanation for Patch, can I know where to view the var formula that you mentioned? Thank you
Can you tell me when in the video I mentioned it and I will get you an answer.
Thanks !
So, if I have a DropDown control (related to another SP list) in my form, I can't use SubmitForm, but Patch only ?
Correct ?
Or perhaps to use SubmitForm for populating MOST of the fields and THEN Patch to fill this ONE DropDown (related to another SP list).
Feasible or not ?
As a Power Apps Newbie, this is a great easy to follow video.
I'm assuming that using patch will make using a SQL view for display and then using the underlying table to save easier?
Thanks for this Shane. Saving changes using a form has the OnSuccess event to let you know that the save went ok. Is the absence of an error the only way to know a patch worked?
Patch is great to use but how do you handle the equivalent of the Forms 'On Success' & 'On Failure'?
thank you ,
is that the same when using form to modify sharepoint list from gallery
Forms are different but you can use them :)
Hi Shane, thank you for the video. I am trying to patch a collection into a dataverse table based on the matching lookup column from the table and a column in the collection. This is not working properly. Anything am doing wrong? Thank you.
Did you see this video? PowerApps Dataverse Lookup columns and Relationships - Create, Edit, View
th-cam.com/video/BPkv7S11Zp8/w-d-xo.html
生动, 通俗易懂、感谢沈阳老师
不客气 (Hopefully that says you are welcome) 😎
Hey Shane, do you have any video on containers and it uses? we do create responsive apps without containers right, nowadays every now and then in youtube people are adding containers in powerapps, there are 3 types of it, why should we use? what is the exact use of it
This is one of my favorites. Shows how to use Containers instead of Groups. th-cam.com/video/BL7a5PmgZoc/w-d-xo.html
@@ShanesCows Thank you so much #Shane 😍
Hi Shane, Really nice video, thank you!! I want to upload image from power apps to my sharepoint column Image and view it as well in power apps, how can i do that? Thanks in advance.
I don't have a video on that yet, it wasn't easy the first time I looked but I do plan to revisit it.
Hi Shane. If using SQL Server for this demo, just a reminder that the table in the database has to have a Primary Key which has Identity turned ON, for the button to work adding a new record.
Great point! Thanks for the reminder. It has been a long time since I did a SQL video... maybe that should change. 😎
Hi Shane, How about if we want to use both for adding new records and editing abilities at once?
Yes, possible as long as you can create the info.
Another great video Shane. Always good as a quick guide/refresher. Many thanks.
My pleasure!
Is it good practice to add a timer when patching a text input? I have a text input with the patch set on the "onchange" Property and its of course trying to patch after each character is typed. How annoying. hehe. My research has led me to the timer solution but I was curious if you agreed or not.
YOu could do that. Typically I don't like to Patch OnChange for the exact Chaos you mention. Setting DelayOutput to true will help but I would make the users click Save, if not you are just asking for trouble. :)
If you do stick with OnChange then include a loading spinner th-cam.com/video/UWy5I_MuIgU/w-d-xo.html so they can't make any changes until the first one saves.
I went with your advice and set all patch statements to one button. Then I added a nice little spinner to watch while it runs and set the image to go invisible when its not running. Thanks a bunch!@@ShanesCows
@@MichaelDeBlasis1369 Awesome. While your users don't think it is ideal, it will make the app most stable and performant, which they do actually care for. 🤩🤩
I would love to also add a way to track changes and make the save button a different color when changes are detected. As well as notify the users when they don't save data and attempt to navigate away. And I WILL figure it out somehow. haha. THats my self handed project this week. Try and make that a reality because it just seems cool to do.
Great video. Love your content. How would you handle tracking if there's are unsaved changes like with a form?
You would have to add OnChange to your controls and have it set a variable when a change is made, then use that as "UnSaved" logic.
it reminds on the very first video i had to watch on the same channel. Always instructive to refresh my knowledge !!
Thank Jean. I felt like so much has changed visually it was good to cover it again just to make it fresh. And a reminder never hurts. 😎
@@ShanesCows exactly !
The .Text bit was all i needed :)
Awesomeness, glad it helped
Great video that really helped me with the Patch function!
Just a quick question. I had to do a patch to a SharePoint OnPrem list throug a gateway. Text, and date columns worked just fine, but choice and lookup columns just blowed up. I tried build the 100% same patch on my own SP Online envirorment, and everything went smooth. Have you tried something similar? Ended up using a form to avoid the errors.
Frank that makes zero sense to me :( It shouldn't be different.
Hi Shane, i'm working on an app for practice purposes and i used a patch to submit a form and I tried to use the OnSuccess property to send an email notification but it doesn't work. Could you please give out pointers on how to go about!?
If you Patch from a form you are not submitting the form so OnSuccess will not trigger. You would need to add the Send Email after the Patch.
Patch(....);
SendEmailv2(...)
Something like that.
Great Video Thanks, How do i patch an image (upload) to a image column in sharepoint.
I haven't tried that one. I usually upload the image to a doc library instead th-cam.com/video/3QaiM8SeWfM/w-d-xo.html
Hi - great videos! Thank you. I had a question. I have a shopping cart type app (thanks to another one of your videos). The initial screen is a gallery populated from one datasource (catalog) that is a SP list. I want users to select an item and 'navigate' to the next screen that is the actual order form which is connected to another SP list (datasource is shopping cart). The two datasources share several fields and I am trying to get the item name and quantity fields to populate on the form from the gallery. I do also have a collection that grabs that data and I've tried to use that. Nothing has worked. I've ever gotten error messages that datasources don't match or just no error but nothing moves to the next screen. So I guess I am looking for info on how to move data collected in a gallery from one datasource and move it to a form using another datasource. I hope that makes sense.
every time I use patch I always come back to your videos, this was great quick refresher - thanks. Is it possible to use patch to reset a value to a default one or null a value? say remove a date in a record to null?
This video explains it Alan 😎 th-cam.com/video/VUk7krgitzw/w-d-xo.html
Thank you amazing video there is always a random setting to do something.
Thank you for sharing the Best Practices. Appreciate it.
With the View and Edit form, I find it hard to change the look and feel. Do you suggest using the Patch function so that we can have an easier option to design fields? Appreciate your input.
My pleasure!
Yup. If you want things to look nice you should switch to patch.
@@ShanesCows Thank you. Do you have videos on design best practices?
How would you patch to a different data source, though? In my case (after watching), I got everything set up and working. I added a "complete task" button with onselct to remove the item from my sharepoints list. I would like to add this removed item to a different sharepoints list to retain the completed items. How would I patch the item to the different sharepoints list using the same button I mentioned. I did try on my own, and I keep getting a "network error field title is required."
Hi @Shane, I need your help. im trying to edit the previous record in powerapps and save it as a new record in a dataverse table..:: how caj I do it??
I have a video that talks about Copying an Item like that :) th-cam.com/video/mbKovagC7As/w-d-xo.html
Hi - I would love to see a video (if one doesn’t already exist) - on best practice when dealing with both new items and editing existing items. What’s the default property of the input controls? How do you toggle between showing the selected items’ value when editing and blank them when creating new records?
Amazing video. Thanks for sharing!
My pleasure!
Could you explain how to add a line to patch something that is a drop down/searchable box? For example, I have a drop down box with the option to search for your supervisor name and have it linked to Office 365 data. How can I get this to patch and add the data entry into the Sharepoint list? Thank you
Great video, thanks! I can't wait to go and get rid of that ugly form control!
Nobody likes forms 😹
Can you use patch with a dropdown?
Yes. I show it in this video where I talk about complex SharePoint columns. th-cam.com/video/b4Fb57UsJLI/w-d-xo.html
Nice one... But how to proceed about the onsucess events?
Patch(logichere);Whatever you want to do when the Patch is done. 😎
Bonus:
Set(varRecord, Patch(LogicHere))
That would do the Patch and save the record to the variable varRecord. That would be the same as Form.LastSubmit
Can you elaborate on the benefits of patch vs (viewform,editform, newform)?
Thx
What happens to the bennefits of using the OnSuccess of a Form upon submitting it? How do we accomplish those results with just Patch?
Set(varRecord, Patch(…)) now varRecord has the output of the patch aka the LastSubmit. 😎 Maybe I will do a new video on just that.
Hello Shane, perfectly explained, thank you so much ;-) Patching an existing item with "Gallery.Selected" works fine, but is there an easy way to patch an existing item based on for example ID or Name? Thank you ;-)
Thanks Shane 🙏🙏🙏
You are welcome. Patch is Perfect! 😁
1000 thanks - Shane scales up the capability kung fu perfectly here
Awesome! Glad to help
Thank you so much. This is great!
Thanks, Shane!
Happy to help. :)
13:24 I wonder if it's still possible to update the records in the gallery, when using Collect function rather than Patch function? Collect function doesn't have a field to allow us to type "Defaults(Employees)" like there's in the Patch function. That's why I find it a little bit tricky to determine where and how to use it.
You can Patch a collection. :) Collect does not update existing records, only adds new ones.
@ShaneCows thank you so much for all the videos, you help us so much with all of them. I do have a very basic (probably stupid) question that every time I'm creating something in Power Apps I struggle to understand the diference. In the very beginning of your Patch formula explanation you add the record Title and then you added First Name. Why First Name is in between single quotes and Title is not? And when it comes to Age again no single quotes... it's confusing for a young padawan like me 😞
If the field name you are using has a space you need the quotes. SO:
Title
'Title with a space'
FirstNameNoSpace
'First name with spaces'
That is it. :)
@@ShanesCows ok I feel even more stupid now seeing how clear this is... but an informed stupid 🤣🤣🤣. Thanks again!!
Nah better to ask then wasting braincells @@vidalrick75
Hi Shane, I'm trying to patch 3 columns, they all have links, I did this but it only patches the first one, any idea on how to get all 3 patched? Thanks!!!
Patch('SP List',
Defaults('SP LIST'),
{'Title': DataCardValue18.Text,
'Column 1': RichTextEditor2.HtmlText,
'Column 2':DataCardValue31.HtmlText,
'Column 3':RichTextEditor1.HtmlText}
)
can you do a class on how to pull all records from a collection via html to print to PDF?
th-cam.com/video/bfXV_GXc_JM/w-d-xo.html should be exactly that.
Good video. In terms of patching a SQL data source. How do you handle SQL table primary keys which are auto numbers when creating a new record? Also, the not null fields, I guess they could be given a default value when creating a new record.
I do not patch when using SQL. I make sure my SQL data table has a primary key. Then I use the new app function, use SQL and then let it automatically create a three screen app.
I do however use patch with SQL data if I am creating adding an editable table to the app I just created.
Thanks for the response I've learnt so much since I posted that. I've since learnt how to patch, and it is now straight forward for me.
One problem I'm having though is that one table is not patching because the user does not have permission to add a new row to a table. It is only one table, and the other tables are fine. Using the set var for a common person identifier across tables and for this reason Power Apps treated it as a handled error with no warning that one table was not getting patched. I used Shane's example code to get Power Apps to show the handled network error.
So now I'm working out how to ensure users have the necessary permissions to tables so that this does not happen.
@@bartleymollohan1090
I love the patch function. I know that this is indirectly related to patch, but when I do in gallery editing with onChange patching, the selected field (focus) will jump to where ever it wants to after the data source has updated and the gallery receives it's data has changed refresh event. For the end user this is very disruptive. Since this is being done inside of a gallery, SetFocus does not work (boo). is there a way to keep or put the selected field back to the place that the user wanted it to go after the gallery goes thru it's datasource refresh?
How would you patch a pen input when submitting a form into a SharePoint list? And then be able to pull that peninput from the list into an email or pdf?
How do you patch multiple people picker fields.
The same way you patch multi select choice columns but using the record style I showed for a single person.
It’s not multi choice people picker it is 3 people picker with different values. I ran in to issue of having the first one being patched only all the time.
This is helpful, but didn't work for my current situation. OnSelect I want Status field to update, based on what was selected in a dropdown box. so basically If ddAppRej = Approve then update Status to Submitted for Processing and if ddAppRej = Reject then update Status to Rejected. And also, patch the Notes field data into the record. I could probably figure it out, but if you have another video to direct me that would help, please let me know.
Excellent video (as usual from SY...) but the REAL problem is that now (June 2023) all your excellent and useful videos on "How to Patch Complex columns" DOES NOT WORK ANYMORE!!! Could you plead help us with the new sintax?...please...
Did you see the new version of the Patch complex column video I put out? th-cam.com/video/b4Fb57UsJLI/w-d-xo.html Everything there works best I know.
@@ShanesCowsNo, I didn't, but I did after your reply: It was exactly what I needed and it helped me solving my problem. Thank you, Shane: it is not by accident that you are "the Rockstar of Power Apps"!!! By the way my mistake was that I was working within a solution, but I did not put my data source (A Dataverse table) inside the same solution, as so0n as I imported the data source I was able to replicate your exercises. "Thank you and have a nice day!!
Nice recap 😊😊
Thanks Frank 🐶
Hey Shane, Hope you are doing well, I have been trying to add a code to a Save Icon so that when selected it takes the form that I created to a different SharePoint List, but it has not been working ,I'm new to this Sharepoint powerapps area and Im just lost at this point Idk what function to go for i tried collect but was told it is wrong they told me to use patch function but i keep getting the record type issue
Thanks for the video, how to use a function with more than 100 characters of text
The amount of text is dependent on the column you are saving to. A dataverse text column defaults to 100. You can edit your table and increase it.
I am trying to do a very simple patch for a new item, and I keep getting "Network error when using the patch function. The requested operation is invalid." All I trying to do is patch text to a text column.
What is your formula?
@@ShanesCows Something so mind-boggling simple: Patch('Master Library',Defaults('Master Library'),{Title: "Dissemination"})
@@joepark8872 That looks correct. Hmmm. Any other required fields? Do you have permissions? That should be good.
@@ShanesCows I even switched to SubmitForm(FormName) and got the same error.
How do you "De-Select" and item slected in a gallery?
Instead of referencing each columns in patch how can I only reference few columns?
You only have to reference the required columns all of the other are optional.
Sorry my question was not clear. I have one text input box that populates data(say parameter) from a table based on unique id selected by user. Then based on each parameter that got populated on the screen, user will input value for each parameter. Now each parameter is column name of the output table I want to load data. So I have to put condition like if parameter populated on screen = column name on table then patch the parameter value entered.
Great video, but patching I’m not patching 33 fields.
Sometimes you have to pick your battles :) If forms work then 👍 lets do that :)
Can I patch from one list to another? I have a "parent" list with requests and a "child" list with comments with "title" as the key field. In a screen, I have a gallery that pulls an edit form from the "parent" and an edit (mode of new) for the "child" so a comment can be added. I can "form submit" the new comment, but I'd like to find a way to take some data from the "parent" to update the "child" so I can send an email to the person that created the "parent" item with the comment that someone puts in the "child" one. If you can understand what I just said, you win "Dawn translator of the year" :D Sometimes us low-coders get in a little over our heads!
Hi Shane, do you need to do something different, if your data source is an excel table, as opposed to a sharepoint list? I have been trying to replicate your formula for my excel table data source, but keep getting the error icon. Thank you
Patch(
NamingConventionTable3,
Gallery1.Selected,
{Status:"Test"}
)
That looks correct to me. The Items for your Gallery1 is NamingConventionTable3? There is a column named Status with a type of Text?
@@ShanesCows yes, both of those are correct and i am entering this value in to the OnSelect property of my button.
😅 👌👍
😎🐶🙌
Hi Shane, thank you for video, will you consider to make one for Parse JSON function in PowerApps 🙏🏼🫶🏻
I will put it on my list now that it is Preview. :)