PowerApps Patch Function

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 442

  • @rachelroberts685
    @rachelroberts685 2 ปีที่แล้ว +2

    A shortcut for new SP items with a Power Apps form, I used UpdateContext and set the Default Selected value of the choice column to the variable name, then updated the variable before submitting. It works like a charm!

    • @ShanesCows
      @ShanesCows  2 ปีที่แล้ว +1

      Very cool Rachel.

  • @fidomcvitie9418
    @fidomcvitie9418 4 ปีที่แล้ว +1

    Thanks Shane, more than 2 years on and this is still gold!

  • @JonathanExcels
    @JonathanExcels 6 ปีที่แล้ว +3

    I kept hearing about 'patch' but wasn't really hearing WHAT it was. You explained it clearly. Thank you. Helpful video.

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      Glad you liked it.

  • @paulmoody4599
    @paulmoody4599 6 ปีที่แล้ว +10

    Shane, your videos are awesome. I only recently started using PowerApps and have learnt so much! The pace is spot on and the delivery style makes things easy to follow and revisit. 👌

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      😻 Awesome Paul.

  • @s961201
    @s961201 4 ปีที่แล้ว +1

    Hi - love your videos! Thanks a lot. In your patch example in this video - is it necessary to patch via a button when you have made a selection in a dropdown? I'm trying to patch using the "On change" event/property of the dropdown. But iut won't let me. I have a gallery of cost saving hypothesis in my business. I would love to be able to assign status (Initiated, In progress, Needs clarfifications, Closed etc) on the go in my gallery browse/list and have my excel table updated with the correct status whenever I change the value in my drop down lit. Was I able to make myself understood here...?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      The same code that works for a button OnSelect should work for OnChange. Maybe post a new comment with your error message you are getting.

  • @DonD-h3d
    @DonD-h3d ปีที่แล้ว

    Hi Shane, I am loving your tutorials! Very helpful. I did have a question, I have 10 patch fields on my screen...do I have to reset each one individually after the update context?

  • @wikiexpert
    @wikiexpert 5 ปีที่แล้ว +1

    Great work Shane, your instructions and examples are brilliantly clear!

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Glad to help. 😀

  • @dylanmonson7689
    @dylanmonson7689 3 ปีที่แล้ว +1

    Thanks for all the videos Shane; Is it possible to use patch to somehow overcome the 20 item limit using Choices() for a managedmetadata column? This is a tough limitation for what i'm trying to accomplish.

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      I don't know Dylan. I haven't done anything with managed metadata in a long time.

  • @diegoacevedo1778
    @diegoacevedo1778 3 ปีที่แล้ว +1

    Because of your videos i'm about to become a hero in my organization. Thanks from Perú, keep it up!

  • @AhmedBalfaqih
    @AhmedBalfaqih 4 ปีที่แล้ว +1

    You may forever stay Young. Once again, spot on. I saw other videos by other people, covering the same subject, your videos are miles ahead. Thank you.

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      I appreciate that!

  • @markpickett5016
    @markpickett5016 5 ปีที่แล้ว +1

    Great video Shane - I had struggled to get a dropdown control to bind to a choice field from the data source until i watched this one! Really helped out with an app I'm working on where I want to allow users to filter a gallery based on a dropdown value. Thanks!

  • @Productivity365
    @Productivity365 3 ปีที่แล้ว +1

    Hi Shane, Thanks! every time I learn new trick when watch the video.

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      Glad to help. 😀

  • @juanp.ortizm.3018
    @juanp.ortizm.3018 3 ปีที่แล้ว +1

    Hi, great video. I want to thank you for your dedication, I have a question, if I want, in a combobox show all the users of my office 365 and save it in a user type field of a sharepoint list, how can I achieve it, using patch?
    Thank you very much

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      This will show you the way th-cam.com/video/gsk14D-CYRE/w-d-xo.html

  • @kolbybeck1702
    @kolbybeck1702 4 ปีที่แล้ว +1

    Shane, are collections persistent? Meaning if a user opens my app on their phone and then on their desktop, will the collection live between the two devices? Or will patching to an entity in the CDS be the best option?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      They are not. If you want the data available you will need to save it to a datasource 😀

  • @gympcd087
    @gympcd087 5 ปีที่แล้ว +1

    Hi Shane! Is there a way that I could type in a color if the dropdown didn't have my favorite color?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      You would have to build functional for that. Or add Other to the Dropdown and if they select that show a text input to capture the value

  • @cummins75901
    @cummins75901 4 ปีที่แล้ว +2

    Shane, as usual your videos are very helpful. Any way to have the displaymode only change for thisitem when selecting edit instead of the whole gallery? Thanks in advance.

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Yes but complicated. This video will help you get the concept I think. th-cam.com/video/HUX_0AA4-Hs/w-d-xo.html

  • @rachelgriffing7197
    @rachelgriffing7197 5 ปีที่แล้ว +3

    Thank you for all of your hard work on these videos! They have been extremely helpful in learning PowerApps from the ground up. Your enthusiasm and expertise make these super enjoyable to watch.

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Thanks Rachel. Glad to help

  • @garylynch2734
    @garylynch2734 5 ปีที่แล้ว +1

    HI Shane can you use this functionality with out using a gallery? The gallery is limited by size (height) ps in 2 months you have really lifted my knowledge in this so much thank you.

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Yes. No Gallery required 😀

  • @craigjenkins6917
    @craigjenkins6917 6 ปีที่แล้ว +1

    Another great video Shane. This is the type of instructional videos people are looking for. Very informative and again easy to follow.

  • @altino91255268
    @altino91255268 3 ปีที่แล้ว +1

    Oá Shane, as always your videos are fantastic.
    Will you allow me to answer some questions?
    1st You used the Choice function, as follows "choice (fontededados. Column) this form is only for complex columns?
    2 ° When should I use Selected or Selectedtext?

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      SelectedText is deprecated so always use Selected.

  • @lawrencesproul1541
    @lawrencesproul1541 ปีที่แล้ว +1

    I simplified your DropDown Patch code by using a separate button to create a NEW record. Basically I used: Set(varRecord, Defaults(DataSource)) which enables lots of cool features such as canceling the new record and reselecting the previously selected record in the gallery...

    • @ShanesCows
      @ShanesCows  ปีที่แล้ว

      Perfect that is one of the things I teach in my training class these days. 😎

  • @grapegh0stx
    @grapegh0stx 3 ปีที่แล้ว

    Thank you for your hard work. Just a question though
    is it possible to patch all entries similar to SubmitForm?
    I just want to "Save As" during EditForm and I do not know any other method rather than patch but with many fields (over 100) I find it irrational way sadly

  • @JT-sr7fp
    @JT-sr7fp 4 ปีที่แล้ว +1

    Thanks Shane. Probably a simple question but cannot find the solution - How do I patch back information from the power app form to update an existing record in a SharePoint List, instead of it creating new records? Thank you

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว +1

      Patch(SharePointList, LookUp(SharePointList, formula to get the record you want to change), {ColumnToChange: ValueToSet})

  • @rickdesnoyers8978
    @rickdesnoyers8978 3 ปีที่แล้ว +1

    Hi Shane, thanks for another great video! Question: I have a 'person' field (SP List) that I'm trying to change for a selected gallery item. ThisItem isn't available and the Lookup function doesn't appear to update the record when using a Button with OnSelect. Any thoughts?

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว +1

      It is a complex column so you have to do it differently th-cam.com/video/gsk14D-CYRE/w-d-xo.html

  • @swaminawale7386
    @swaminawale7386 2 ปีที่แล้ว

    Patch(Emp_Info_List, Defaults(Emp_Info_List), {
    Title: nT.Text,
    'First name': nF.Text,
    'Last name': nL.Text,
    'Fav color': nFC.Selected (

  • @CarlosSolisNow
    @CarlosSolisNow 2 ปีที่แล้ว +1

    Just love it. It gave me what I needed to finish an app I built over lunch on Wednesday. Just AWESOM⚡⚡

  • @PACWESTVB
    @PACWESTVB 3 ปีที่แล้ว +1

    Thank you for all your great videos! I have been using your videos to help our club manage our own database. I have a question regarding the patch function. When I insert a slider on a gallery and use the patch function on the OnChange, the app slows down immediately and just has the dots going across continuously. Would you be able to help me configure a better way to have the slider make changes without having a save button? Thank you!

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      Unfortunately I don’t have a good answer with the slider. 😔 Every step is going to trick on change. Boo. Might have to come up with a plan B. Dropdown instead? Sorry

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      Fun fact. I have played and coached club volleyball. Coached a couple of teams that made nationals. Been a long time.

    • @PACWESTVB
      @PACWESTVB 3 ปีที่แล้ว +1

      @@ShanesCows Awesome! Volleyball is a great sport! I'm trying to make an evaluation tool on passing, setting, hitting, blocking, serving. Something that is quick while the athletes run through. Last season we had 300 players to evaluate. I like the slider for the quick movement, but I think I'm going to have to go with a save button. Does that seem like it might solve the issue?

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      @@PACWESTVB yes that would do it. Or use a Dropdown and then you can use OnChange

  • @neerajcoolcs055
    @neerajcoolcs055 5 ปีที่แล้ว +1

    Hi Shane,
    Great help to new beginners.
    1 doubt I have - can patch be used on a single button to perform either edit or insert new record?

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Yes. Incorporate an If to determine which want you want the button to do.

  • @ResponsibleXI
    @ResponsibleXI 4 ปีที่แล้ว +1

    Thanks a lot Shane for this wonderful video. Learnt too many things from it. In your above example, what if I have one of the fields from 2nd SharePoint list on the same screen and i want to update both the lists with the save button? Do you already have video for that? How do my patch function will look like?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว +1

      Patch(first list);Patch(Second list) is what I think you are looking for.

  • @lorenasanchez7581
    @lorenasanchez7581 3 ปีที่แล้ว

    Hello Shane, thank you for this useful video, I only have a question, I struggled to do the same yo did with cancel and edit, in my case with different icons(edit and cancel hover), could you please give me an idea , how can I do a toggle with icons. I'll really appreciate it.

  • @StevenNel
    @StevenNel 4 ปีที่แล้ว +1

    Hi Shane,
    First off, your tutorials are epic. Really helped me get started with PowerApps. I have a quick question: I am using a Gallery to collect data sort of like your Shopping Cart tutorial. What I want to do is search a sharepoint list for a record using data from a collection to find the record to patch in SharePoint. Below is my function:
    Patch('Demo Stock'; Filter('Demo Stock'; PartNumber = ThisItem.Code; SerialNumber = ThisItem.Serial); {ItemStatus: "Available"});;Refresh('Demo Stock');;Remove(LoanItems;ThisItem)
    I'm getting an invalid argument type (Table) error with the patch function and I am assuming its got to do with the filter.
    Im sure its something simple?
    Cheers

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Replace filter with lookup and I think you have got it.

  • @magebol
    @magebol 4 ปีที่แล้ว +1

    Hi Shane. Great Channel! very useful, thanks. I have a question about Patch. I have one button to do a 1s patch/create record, which works well. But when clicking on a second Button, it is creating a new record instead of updating the record I created with the first Button. Both buttons are outside the form in the Layout. What should I do? Thanks

  • @remisuszkiewicz5543
    @remisuszkiewicz5543 5 ปีที่แล้ว +1

    Hello Shane, another great Video from you. I am currently busy with a slightly different question. I want to create an app with a custom form that restores collected data to a list. How is it possible, if it is possible? Thank you in advance.

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      I don’t follow. Can you give me more specifics on what you want to do or isn’t working?

  • @ResponsibleXI
    @ResponsibleXI 4 ปีที่แล้ว +1

    Hey Shane, Thanks for taking sometime and responding to my question. Here is another one. I am launching my PowerApps directly from SharePoint list and I am not creating any button on my form. I have one of my columns to be patched to another SharePoint list. Without having to create the button and by using exisitng "Save" option on SharePoint EditForm, how do I use patch function?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Put it OnSuccess of the form

  • @shoebwk
    @shoebwk 4 ปีที่แล้ว +1

    Hi Shane, in my display form I am trying to use the Edit button toggle to bring one field in Edit mode but its not moving out of the view mode. Is there any restriction on the display form ? or am i doing something wrong?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Should work. Maybe check out this video for some hints? th-cam.com/video/BnzaSDYl8mA/w-d-xo.html

  • @guillaumechandonnet8225
    @guillaumechandonnet8225 4 ปีที่แล้ว +1

    Hi, i've got a question, maybe i skip that part but, i have a sharepoint list with multiple row, one of the column is a list of communications. One of the other column is call 'Seen by' that will be fill later on with a 'x' when the communication as been seen. How with a Onselect button i could add the 'x' in the SeenBy column based on the communications select in a listbox inside my powerapps?
    Thanks a lot

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว +1

      Patch(datasource, listbox.selected {seen you: User().fullname) is roughly it

  • @capucinevetter8681
    @capucinevetter8681 4 ปีที่แล้ว +1

    Hi Shane ! Thanks for the video. If we want to Patch in a FormViewer, what would be the record part of the formula. "ThisItem" doesn't work... I have a message error. Many thaks in advance for your answer !

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      You would want to Lookup the record you want to patch. You are right thisitem doesn’t work out of a gallery or form.

  • @osamaalam6336
    @osamaalam6336 3 ปีที่แล้ว +1

    So informative and entertaining. Also, what if we want the edit display mode to only appear in the item where we pressed edit, instead of all?

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      I show that concept in this video. th-cam.com/video/HUX_0AA4-Hs/w-d-xo.html

  • @arnaudcoulon120
    @arnaudcoulon120 2 ปีที่แล้ว

    Hi Shane,
    Great video ! I just discovered Power Apps and I'm learning a lot thanks to you.
    Still I have two questions :
    - Is there anyway to have a unique edit and save buttons which patch all of the items at once ?
    - When saving, some items in the dropdown selections don't display anymore, do you have any solution ?
    Thanks again !

  • @robertz.180
    @robertz.180 4 ปีที่แล้ว +1

    I searched for it (Edit Gallery Items). Thank you Shane

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Glad to help. 😀

  • @zeugnima
    @zeugnima 5 ปีที่แล้ว +1

    Awesome videos, so useful in helping me understand PowerApps. However my app is loading with my cancel button visible, once I enter and then exit "lets edit " it functions as expected. Is there a way to ensure that the app loads with "lets edit" set to false? or is that even the problem?

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว +1

      You can set the variable to false when the app loads. Use OnStart.

    • @zeugnima
      @zeugnima 5 ปีที่แล้ว

      @@ShanesCows I had tried that using [App>OnStart=Set(LetsEdit,false)] it turned out that I needed to change [visible=LetsEdit] to [visible=If(LetsEdit,true,false)] on my save an cancel icons. I'm not sure if that was a function of using icons vs buttons, but thanks for your help. I wouldn't have gotten nearly this far without the video!

  • @ricci.hidalgo
    @ricci.hidalgo 3 ปีที่แล้ว +1

    I have a simple question: Can the interface you have created in this video have the exact same behavior except that the 2 fields ("Favorite Colour" and "Title") go in edit mode just in the selected item of the gallery when pressing the edit button (the buttons should hide for the all the unselected items)? That would be even a better experience for the user as it will be easier to see which record he is editing (I have seen some phone apps working that way).
    Also, I would need make the selected item of the gallery higher (keeping the other items with the same high) for making extra space to show additional lookup fields just for that one.
    If this is not possible (as I suspect), then I will just go ahead and create a separate record editing screen as how the templates work.

    • @ricci.hidalgo
      @ricci.hidalgo 3 ปีที่แล้ว +1

      I have just received an answer from PowerApps 911 suggesting me to add the condition "&& ThisItem.IsSelected" in the Display Mode to each "Text Input" component in order to make editable the selected item of the gallery only. Concerning the extra lookup fields for the editable record, it's the same idea; use an adjustable gallery and set the height of the item dynamically to "If(VarEdit && ThisItem.IsSelected, 300, 150)". Thank you PowerApps 911 for your support!

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว +1

      Glad the team was able to help. 🐶

  • @ritikasingh7530
    @ritikasingh7530 6 ปีที่แล้ว +1

    Great video Shane! Just wondering instead of having Edit button for each gallery item, is there a way to have 1 submit button for the full gallery and save all gallery items ?

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      Nope. You could use on change to save the items but that gets messy to me.

    • @ritikasingh7530
      @ritikasingh7530 6 ปีที่แล้ว

      Shane Young thanks for responding . I am stuck with how to design a specific requirement for a checklist .

  • @Stacy-skydives
    @Stacy-skydives ปีที่แล้ว +1

    Shane, I just saw the "super trick" how many years later, I dunno, math is hard, anyways, super cool and thanks for all you do for us!

    • @ShanesCows
      @ShanesCows  ปีที่แล้ว

      Happy to help. Have a great day. 🐶

  • @TNNCMusic
    @TNNCMusic 5 ปีที่แล้ว +1

    Hi Shane, great content!
    When i try to use the Patch function it does not allow me to use "defaults" or anythin after Patch for that matter.
    If i go Patch(listname, Defaults(listname), it does not register anything after Patch(listname, unless i use something else than a comma? Do you have any experience with this issue or perhabs any advice? :)

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Are you in a region that uses a comma as a decimal separator? If so you can use a ; where I use a ,

  • @shuoyang8894
    @shuoyang8894 5 ปีที่แล้ว +1

    Hi Shane, this is really helpful video. I just have another question, is there anyway that we can Patch a Blank() value back to the data source? sometimes when a column is cleared, then the data source can reflect the same thing. Many thanks!!

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว +1

      Try this Patch(datasource, Record, {Field: Blank()})

  • @joan322
    @joan322 4 ปีที่แล้ว +1

    Hi Shane!
    I have an inventory/order system going on. I have one gallery which I patch the items over to a collection. With the collection I create a gallery to show what the person is going to order from the first gallery. But if they don't want to order it anyway I want them to be able to delete the item from the collection item and the item should be set back into the inventory again. Is this possible?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Yes use Remove in the gallery to remove the item. Patch the original gallery back at same time if you need.

  • @DeadPixelZombie
    @DeadPixelZombie 5 ปีที่แล้ว +3

    Your videos have saved my bacon with a project I'm on. Thanks!

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว +1

      AWESOME! Enjoy the bacon.

  • @tyronewoods7480
    @tyronewoods7480 4 ปีที่แล้ว +1

    Hi Shane, thanks for the patching assistance! If a record exists in the table you're trying to patch, what function/syntax would you use to test that so that a duplicate record isn't created?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      I made a whole video to help you th-cam.com/video/Ap3_Ea9H8b0/w-d-xo.html 😊

  • @TIMEPIECE66
    @TIMEPIECE66 3 ปีที่แล้ว +1

    Hi Shane - thanks for all the great videos! Hoping you will be able to point me in the right direction trying to write the URL of a Picture field in SharePoint (SP). I can save out a picture to a SP Picture Library and get returned the URL to the Picture. I then try to create a new entry in another list that uses the returned URL as the Picture URL of a Hyperlink/Picture field, set to Picture. I'm using Patch, which shows the Picture: field but it fails to write suggesting it is read only. Any hints or suggestions would be most appreciated.

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      I don't. I haven't tried that. Boo me

    • @TIMEPIECE66
      @TIMEPIECE66 3 ปีที่แล้ว

      Ok, thanks but though it was worth asking. Fancy doing a video on it? 😋

  • @rozhinimani9249
    @rozhinimani9249 4 ปีที่แล้ว +1

    Hi Shane, love all your videos!!! I have a request for a video 🙏. I have two SPO lists and I want to connect them through a power apps form via a common ID (maybe a GUID)... I’m not sure what the best approach would be. Please help!

    • @rozhinimani9249
      @rozhinimani9249 4 ปีที่แล้ว

      To elaborate, the user would fill out form 1 connected to share point list 1 and form 2 connected to share point list 2 in the same app but it would assign the same I’d to both those new record entries to connect them on another screen

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว +1

      Maybe look at this series. it talks about relationships. th-cam.com/video/xgznk4XlPCo/w-d-xo.html The key is your going to need to track an ID of some sort. :)

  • @julianfolino
    @julianfolino 3 ปีที่แล้ว +1

    I'm on a dead end! Thank you for your videos since they helped me a lot but I've been trying to find a solution and I'm lost.
    I have a form in the app with a "Submit" button that has a Flow sending all the information entered by the user to the sharepoint list (mostly text so it's easy). But I want also to have possibility to send attachments and Persons (multiple) and as it is not text, I need to use the Patch but all what I see is to update a record already built. I'm not sure how to do it collectively with this submit button creating the record with all inside. Any thoughts??

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      I talk about patching complex columns in this video th-cam.com/video/gsk14D-CYRE/w-d-xo.html

  • @iyoung2001
    @iyoung2001 3 ปีที่แล้ว +3

    Hey Thanks for the great video, it really helped me understand patching. I'd like to tweak your example slightly.
    Is it possible to set a value (text box for instance) in the item in the gallery so that when "Edit" is selected only that item becomes editable? If I use a variable it makes all items editable, which I'm worried will cause some confusion for my users. I've tried making a new column, but then I think that will change everyone's view whenever someone toggles the value. I haven't been able to figure out how to set a value from a button. I've gotten it to work using a toggle to switch back and forth, but that isn't all that intuitive for the user either, plus the patch function is wonky and there's no way to cancel.
    So far your example is the best of the alternatives I mentioned above, but would really like to be able to make a single item editable at a time.
    Thanks

  • @pennynelson6050
    @pennynelson6050 4 ปีที่แล้ว +1

    I am having trouble trying to patch to a column in my database that is an integer. any ideas?. I am .new at this powerapp stuff and your videos are really helpful.

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Patch(datasource, defaults(datasource), {intcolumn : Value(TextInput.text)}) will turn your text number Into a number number. 😀

  • @timrodrigues-ellis
    @timrodrigues-ellis 4 ปีที่แล้ว +2

    Is there a way to patch a date picker field to SharePoint lists? Thank you so much, your videos are very helpful!

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Patch(datasource, record, {datefield: Today()}) should work

  • @verdijason11
    @verdijason11 4 ปีที่แล้ว +1

    Hey Shane, do you know what the syntax would be to add a checkbox value from SharePoint instead of a choice field (i.e - Choices(Employees.FavoriteColor))?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Maybe this will help? th-cam.com/video/gsk14D-CYRE/w-d-xo.html

  • @mustafahussainmohsin320
    @mustafahussainmohsin320 4 ปีที่แล้ว +1

    Hello, Mr Shane. will that update context variable work for updating the existing record, selected from the gallery? into the form, I am using a patch code on submit button, but when I edit the existing record and press on submit it is creating new records? is that due to variable not used? Please guide!!!

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Try this video th-cam.com/video/MclJ_O9HvJQ/w-d-xo.html

  • @MayankGupta-te3tn
    @MayankGupta-te3tn 4 ปีที่แล้ว +1

    Thank you Shane.
    Just one query, if we want to save all list items of a gallery by just clicking on the update button, how can I do that?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Look for my video on ForAll

  • @danielwatson7974
    @danielwatson7974 4 ปีที่แล้ว +1

    I'm fairly new to PowerApps. This was incredibly useful to me. Thank you.

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Glad to help. 😀

  • @chrisgrubbs6880
    @chrisgrubbs6880 4 ปีที่แล้ว +1

    Shane, great stuff as always! How can I apply the UpdateContext to ThisItem only in a gallery? For example, if someone clicks edit on item 1 in a gallery, it only brings up the save/cancel button in that item only and it disables the other items or puts them in view mode only. Thanks!

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      This video shows it Chris. th-cam.com/video/HUX_0AA4-Hs/w-d-xo.html

  • @rayshrestha7495
    @rayshrestha7495 5 ปีที่แล้ว +1

    Hey Shane, thanks for all your awesome videos, really helps a lot.
    Quick question, my SharePoint list column name has a single quote, for example, "Special Instruction / KPI's" and when I try to patch it with " Patch('Client Briefs',Gallery2.Selected, {'Special Instructions / KPI's', DataCardValue35.Text} " it comes up with an error saying the column name does not exits. I am thinking of changing the column name and trying again, but my whole power apps is built already, and I fear if I change the column name, it will affect my app. Please help.

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Replied to the other comment

  • @vickiscarpato3299
    @vickiscarpato3299 5 ปีที่แล้ว +1

    Shane, another great video! I'm trying to recreate using a Date field (Insert DatePicker) and two Number fields (Insert TextInput of Format Number) . My Patch function gets "An unknown error" whenever I try to run. My Save button OnSelect = Patch('Support Tracking',ThisItem, {Date: inputDate, Influence: inputInfluence, Support: inputSupport})
    I modified the OnSelect to try to Patch with just one of the fields (e.g. Patch('Support Tracking',ThisItem, {Date: inputDate}), and i keep getting the same error, regardless of which field I try to Patch, in any combination.
    Any thoughts?

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      InputDate.SelectedDate

  • @rochellenicholson6372
    @rochellenicholson6372 4 ปีที่แล้ว +1

    Hi Shane another great video. Why would you get the following error when using PATCH, I cant find where the error is coming from. NAME: The specified column is generated by the server and cant be updated

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว +1

      You are trying to patch an automatically generated column. Like ID or maybe a calculated column in SharePoint. Those columns are read only.

  • @gwenmac1601
    @gwenmac1601 6 ปีที่แล้ว +1

    Hi Shane, learning lots from your videos, after adding a record to a data source using the Patch function how can I retrieve the primary key that was autogenerated.

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      Pain in the butt to do. Set(varKey, patch(your stuff).id). This may be my next video. Great question.

    • @gwenmac1601
      @gwenmac1601 6 ปีที่แล้ว +1

      Thank you will try that.

  • @jameslbetteridge
    @jameslbetteridge 5 ปีที่แล้ว +1

    Hi Shane, I've been following your recommendation for using Flow to and PowerApps to add data from a SQL DB to a Sharepoint List but stumbled across your Patch video. I've probably misunderstoof Patch entirely but it seems as though this could be used in my soltion instead of Flow? Is that possible?

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว +1

      Yes if I am understand that would work.

  • @MrDonduro
    @MrDonduro 4 ปีที่แล้ว +1

    Hi Shane, thanks for share all your knowledge. I have a question. How can you preserve the structure (including dropdown) and collection fields to save a new record from zero? I could do the whole video but I just need that

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Sorry I don’t follow the question.

  • @mfsalazar1
    @mfsalazar1 6 ปีที่แล้ว +1

    Thanks for the video! I want to known if you can have the button out of the gallery for not repeat it in each item in the gallery. If its possible to have just one button to save all the items?

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      Yes. Look at forall function. There is actually a working example in the video on repeating tables I released this week.

  • @jessicavelez598
    @jessicavelez598 5 ปีที่แล้ว +1

    Hey Shane, great video! I am looking to a patch with a form instead of a gallery. Any tips on what function to use instead of 'thisitem'?

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Names of the control that has the value you want.

    • @picklejuavez6795
      @picklejuavez6795 4 ปีที่แล้ว +1

      @@ShanesCows What do you put for the record id as the second parameter? Thank you.

  • @CedarRidgeRoughnecks
    @CedarRidgeRoughnecks ปีที่แล้ว

    Great video! Super helpful for our department. Subscribed! However, was wondering if you could help with one glitch I'm having. I'm running an Edit toggle: OnSelect UpdateContext({EditMyInfo: !EditMyInfo}). I have a save button like in the video: Visible EditMyInfo. Problem is, when I first start the app, the Save button is visible even though EditMyInfo = false. When I go to click on the Save button it disappears. It doesn't seem to be affecting the use of the app but it might be confusing to my users and isn't very professional. I would appreciate any help.

  • @hollybud999
    @hollybud999 5 ปีที่แล้ว +1

    Hi Shane, How secure is patching to SharePoint when it is within a business? Is there any risk with the data? (Side note - these videos are amazing! I have taught myself so much using these videos!)

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      No security leaks that I know of. 😀 I am using it for some secure stiff with no worries

  • @mustang6514322
    @mustang6514322 6 ปีที่แล้ว +1

    So when it comes to Sharepoint list is it better to use the standard form control or create your own? The standard form control wires everything up for you and minimizes effort but does not allow for applying custom themes as you have to do each and every control individually because of the data cards. The Custom Form allows a ton more flexibility but requires much more effort and code. All of the validation has to be custom written for each control, there also is no Required option on controls but this does allow the easy of applying themes. Thoughts?

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      No right answer here. I think you understand it well so just pick your poison. I usually start from scratch but that is me. 😑

    • @mustang6514322
      @mustang6514322 6 ปีที่แล้ว

      Got a different question. I created my own form and am using a Patch function that i am wrapping in a UpdateContext function. After that I check is Error(ContextVarible) is Empty. If it is not i would like to show the Error but am having trouble with the statement. My understanding is that it should be Errors(DataSource,Record).Message. So when i try this with with record being the ContextVairable PowerApps says the Errors has some invalid arguments. Have you used this command before?

  • @travisbenge1912
    @travisbenge1912 5 ปีที่แล้ว +1

    Thanks for all the great videos!
    I have a question regarding this function:
    I'm trying to do this outside of a gallery, I do have a gallery linked to some display forms, I want to add a counter to the side which updates the SharePoint column of a specific item. So far I have this:
    Patch('MFG Master List', SearchQuery.Selected, {QtyComplete: CountBox.Text})
    My problem is the second bit there, "ThisItem" wouldn't work as this button & field is outside of the gallery but I don't understand how to address this so it is updating the QtyComplete for the item I want.

    • @travisbenge1912
      @travisbenge1912 5 ปีที่แล้ว +1

      Nevermind, for some reason yesterday I was receiving an error and the button wouldn't work, but today it is working fine. So strange

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Glad you got it. 😻

  • @74popette
    @74popette 5 ปีที่แล้ว +1

    Hey Shane! thanks so much for your fantastic videos - you are my go-to-guy for everything PowerApps!! I have a question - is it possible to press the edit button and only make the dropdowns/text fields editable just for that one item, rather than all items becoming editable? Thanks again from a viewer in the UK! (you even spell Colour right! :-))

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      Yes possible just create the correct If logic for display mode of the controls.

  • @MrIke1214
    @MrIke1214 5 ปีที่แล้ว +1

    Shane, Your videos have been a huge help. I've been learning a lot! I have a question about Collect/Patch- Is there a way to collect data into my sharepoint file from a Text input box? For example, if my radio button which has Yes,No,N/A- If No is selected, a text input allows explanation. Can that explaination be transported into the sharepoint file?

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว +1

      I have never tried to edit a file... not even sure where to tell you to start. Sorry.

    • @MrIke1214
      @MrIke1214 5 ปีที่แล้ว

      @@ShanesCows Thanks for the response. You're videos have been a great help as I learn this platform.

  • @robdownend
    @robdownend 6 ปีที่แล้ว +1

    Hey Shane, great videos. Do you have a solution for addressing SharePoint Choice columns that allow "Fill-In" values? I'm seeing issues with the list getting the fill-in values, ends up being blank. I read somewhere that fill-ins aren't supported, but figured there has to be be a work around. When trying to use Patch for a new record I'm getting an error when referencing "ThisItem" as it doesn't exist yet... Any insights would be greatly appreciated.

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      No fill ins. Sorry. You would have to create a button to add to the list.

    • @robdownend
      @robdownend 6 ปีที่แล้ว

      Bummer, that’s what I was afraid of. Thanks for the response.

  • @keaklaassen5340
    @keaklaassen5340 5 ปีที่แล้ว +1

    Hi Shane, Again a great video .. Thanks. Do you know why my gallery resets to the first item after patching? 2 Sharepoint lists, want them both to be updated, works great the first time ., after updating the gallery reverts to first item, not the selected one.

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว +2

      Yes. The data source is changing so the gallery is refreshing. Need to store your gallery item in a variable so you don’t lose it. This might be my next video. You are the third person to have the issue this week. 😀

  • @ricci.hidalgo
    @ricci.hidalgo 3 ปีที่แล้ว +1

    Wonderful and useful video, thank you very much Shane for sharing your knowledge.

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      You are welcome 🐶

  • @virgolove9274
    @virgolove9274 5 ปีที่แล้ว +1

    Hey Shane, so my issue is that i got everything up and running, however i dont have the drop down option, so i done everything like you did but for my drop down list its only showing my current value selected and not giving me a option from a drop down menu when i press play?....if i create a drop down box outside of the gallery then i can view the drop down options, but the one inside the gallery,wont appear?

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      It should work. I would start over and see if you can find the little piece that is out of sorts. Good luck

  • @cesarherrera7509
    @cesarherrera7509 6 ปีที่แล้ว +1

    Very informative, Video Shane, i have replicated your instructions but within another form sort of a parent child form, the issue that im running into it that the gallery will update all the item as opposed to just one, have you had any issue like this where you update one but a few seconds later the rest update to the saved value/text. any ideas to point in the right directions would be greatly appreciated.
    Thanks
    Cesar

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      Can you share the code you are using? Might give me a hint to help you. :)

  • @imax8307
    @imax8307 ปีที่แล้ว +1

    Adding the action buttons/icons within the gallery within this way means that the icons/button visibility changes on all items. Is there a way to have this happen for each item?

    • @sonmarl
      @sonmarl ปีที่แล้ว

      I came here to ask the same thing. I was hoping that this would be covered at the end of the video, as this makes the whole form unusable from a UX stand point.

  • @searchingyt4246
    @searchingyt4246 3 ปีที่แล้ว +1

    Hey Shane, you are doing amazing work! Excellent man!

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว +1

      Awesome thank you!

  • @gerantinahoxha8927
    @gerantinahoxha8927 4 ปีที่แล้ว +1

    Hi Shane. All of your videos have been very usefull to me so far. Thanks a lot.
    I have a question, I would really appreciate if you can helo me.Im using Patch to update a date column in sharepoint. What I do: Patch([@'Gallery']; ThisItem; {Datecolumn: DatePicker.SelectedDate}) but at the end nothing is changed. Thank you in advance

    • @gerantinahoxha8927
      @gerantinahoxha8927 4 ปีที่แล้ว

      Ps: it doesn't show any errors. And when I use it the same way but for e.g with a dropdown, everything works fine

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว +1

      Patch(datasource not gallery1

    • @gerantinahoxha8927
      @gerantinahoxha8927 4 ปีที่แล้ว

      @@ShanesCows Thank you

  • @Klote3241
    @Klote3241 3 ปีที่แล้ว +1

    Hi Shane, thanks for your video. i have a question regarding the patch function... i would like a single button to update 2 lists at the same time. so 1 lists keeps information about the user and the other list just registers the amount of people with some sort of counter. for some reason when ever i try to add a second Patch argument i get errors what am i doing wrong :/

    • @ShanesCows
      @ShanesCows  3 ปีที่แล้ว

      There needs to be a ; between the two patches.

    • @Klote3241
      @Klote3241 3 ปีที่แล้ว

      @@ShanesCows yeah for some reason 1 of those ; arent enough.... i have to add 2 ;; then it works.

  • @carlw
    @carlw 5 ปีที่แล้ว +2

    Hey Shane, I love your videos. I've learned a lot. Question: How come you use Updatecontext for the Letsedit button instead of say setting Set(varEdit, false)?? Like I said, I'm learning so no judgement, I just dont understand why or when we would use one over the other unless they're interchangeable.
    Thx

    • @ShanesCows
      @ShanesCows  5 ปีที่แล้ว

      They are kind of interchangeable. I have a video on variables where I explain more though. 😀

    • @carlw
      @carlw 5 ปีที่แล้ว

      @@ShanesCows Tx.seems one is a global variable the other local. Just picked up on it.i think what throws me off is the inconsistent syntax (Microsoft inconsistent???? Never). Some expressions use "{", most don't. No where I've seen does it describe why and when, moreso you need to learn it through osmosis of using the Force.

  • @beyou7122
    @beyou7122 4 ปีที่แล้ว +1

    Hi Shane! Very informative video! Following your videos are a great help!
    I had a query, i have added a label inside the gallery items, which shows the value of true and false based on some values in gallery items. Now i want to push this label text of true/false in a column of SharePoint list ( the same list this gallery is using). Additionally i want to apply this at the OnStart of the app. Below is the formula that i am using:
    Patch( DataSourceList, thisGallery.Selected, {Column: thisGallery.selected.label1.text})
    This is not showing any error but not patching the SharePoint list as well.
    Please help!
    This is not

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Try Label1.text without the gallery selected part.

    • @beyou7122
      @beyou7122 4 ปีที่แล้ว

      @@ShanesCows i tried, it is still not working.. could you please look into the query
      powerusers.microsoft.com/t5/Building-Power-Apps/Not-able-to-perform-patch-a-label-for-all-items/m-p/652317#M207659
      And this
      powerusers.microsoft.com/t5/Building-Power-Apps/delegable-alternative-for-IN-operator/m-p/652403#M207703
      in community and help on the issue, i need to implement this for my app and i am find of stuck, please help..

  • @johannagemaespinosalazo8855
    @johannagemaespinosalazo8855 3 ปีที่แล้ว +1

    Thank you for all the useful videos you upload, I have a question, how to update a record with PATCH referring to the current value of the field, for example to substract or sum the existing quantity of a product in an inventory record; quantity = quantity + 1

  • @ruthannvaldivia291
    @ruthannvaldivia291 6 ปีที่แล้ว +1

    Hi, Shane, another GREAT video. I am using the toggle functions which is super sweat and all works, except I'm continuing to have a recurring issue with my screen refreshing to the initial value. I say recurring only because it's happening elsewhere. I'm actually using the toggle control with the functionality you've displayed here. it all works but when I add an item, it defaults to the previous save position. ie, if I turn it off, then when I come back it's off vs. being on which is the initial setting. Would you know how to fix or what I might be doing wrong? THANKS! Love your videos!!

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว +1

      You can use the Reset function to set a control back to its default state.

  • @tribalhunter2978
    @tribalhunter2978 4 ปีที่แล้ว +1

    Bless your soul for these videos 🙏

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Glad to help. 😀

  • @eulama1
    @eulama1 4 ปีที่แล้ว +1

    Good Morning! I'm doing your course in Spain, instead of commas I put semicolons and to unite functions instead of semicolons I put &. but putting this function gives me an error when putting them together. Any suggestion?
    Patch (EmployeeDetails; ThisItem; {Deparments: txtInputDpto.Text; FavoriteColor: DropdownFC}) &
    UpdateContext ({LetsEdit: false})
    thank you!

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      I thought instead of & that you should use ;; but I am not sure.

  • @alstonbagot795
    @alstonbagot795 4 ปีที่แล้ว +1

    Can I use the patch function with a form to update my sharepoint list or does it need to be a gallery?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Yes but typically I don't use Patch and Forms together. If you have the data in forms you can SubmitForm and call it a day. But you can

  • @alizia5963
    @alizia5963 6 ปีที่แล้ว +1

    Shane - your videos are fantastic. I am trying to achieve something similar to what you are doing, rather than updating one value at a time can we update multiple rows within SharePoint with just a button click. E.g. can you provide 1 button that updates all the records with favorite color as red?

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว +3

      Hi Ali - Yes. You would want to put all of the updates you want to make in a collection and then use ForAll. I need to make a better video on that function. This video is the closest thing I have right now. th-cam.com/video/DF4KX1oSrVI/w-d-xo.html

    • @BrentonCollas
      @BrentonCollas 6 ปีที่แล้ว

      Thanks Shane, came here for this question. Patching multiple records which match a condition. Off to view your linked vid. Thankyou as well for your videos. Right to the point and no messing around. You are leading the field good man :)

  • @RichBoud1
    @RichBoud1 5 ปีที่แล้ว +3

    Thank you! I spent hours trying to work this out. I’ll give it a go.

  • @Simeon-NL
    @Simeon-NL 6 ปีที่แล้ว +1

    I admire your videos and the explanations! Is there also a way to work with multiple select choices and patch them to the sharepoint list? The odata.type syntax works perfectly fine but does not support combo boxes and thus neither multiple answer possibilities. Have any idea if this just requires a small adjustment or that it is not possible yet?

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      I am not sure. I have never tried. I will try to revisit this next week and see if I come up with anything. If you solve it please let me know. :)

  • @kirillperian
    @kirillperian 4 ปีที่แล้ว +1

    Hi, Shane! Thank you for this video. Maybe this was answered somewhere already, but what's the easiest way of displaying the edit mode for just the item in the gallery where you clicked on the Edit button, so that not all items are switched to edit mode?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      Maybe this will help? th-cam.com/video/BnzaSDYl8mA/w-d-xo.html

  • @carolerlston3876
    @carolerlston3876 2 ปีที่แล้ว

    I really enjoy your videos, I have learned so much, thank you!

  • @hayleeadamson6449
    @hayleeadamson6449 3 ปีที่แล้ว +1

    Another great video! Thank you!

  • @giudicephilippe5644
    @giudicephilippe5644 4 ปีที่แล้ว +1

    Hi, I have a little question: I have 2 separate collections in my apps. Both of them have a common item, is it possible to patch a single SP List with those two collections in the right SP Colomuns?

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      It should work if the columns are all correct

    • @giudicephilippe5644
      @giudicephilippe5644 4 ปีที่แล้ว

      @@ShanesCows do you mean the 2 collections must have the same name? i've tried to patch the two collections in my SP list, it works but it created new ligns instead of writing it on a signe ligne :(

  • @n2datasolutions443
    @n2datasolutions443 4 ปีที่แล้ว +1

    Hi Shane, wicked video! i'm a little stuck at the moment, i've designed a simple app which accesses a record, on the edit form i needed a second patch statement to push some fields to a different sharepoint list based on a selected lookup field, when i patch the record though it fails to update and gives me no reason for doing so... i'm pulling my hair out with this one so any advice would very much be appreciated, the statement looks like this:
    Patch('Properties List', First(Filter('Properties List',ID=DataCardValue10_3.Selected.Id)), {
    RBV: TextInput2
    });

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว +1

      TextInput2.Text is all you are missing. 😀

  • @Xyz9104_
    @Xyz9104_ 4 ปีที่แล้ว

    Shane ..Excellent video, can you please how do you use collect to write a new record , also if my submit button is using to create , can i also use the same for creating new entry in sharepoint list

    • @ShanesCows
      @ShanesCows  4 ปีที่แล้ว

      I think I talk about it in this video but not sure th-cam.com/video/yS6mTRlmuls/w-d-xo.html

  • @RomanBerger
    @RomanBerger 6 ปีที่แล้ว +1

    Hi Shane, at first i would like to say that your videos are awesome I'am learning so much about powerapp here thanks for that. I have one question about patch funcion is it possible to use it for create/edit record in the custom CDS entity. Here is my problem I have custom entity called "TestEntity" and then in the powerapps i have got a button with this OnSelect Patch(TestEntity;Defaults(TestEntity);{Description:"Text"}) powerapps show me an error message "Column doesn't exist". I am using "Name" property of the field not the "Display Name" i also try to patch some of the standard entities like Contact or Account but i have ran into the same problem. Do you have any ideas what i have done wrong?

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      Try putting the entity in a gallery to see the column names that PowerApps sees. Might give you a hint on what to put in.

    • @RomanBerger
      @RomanBerger 6 ปีที่แล้ว +1

      Thanks it helped.. It turns out that powerapps take with field name some unique prefix and btw it is also case sensitive. thanks once again.

    • @ShanesCows
      @ShanesCows  6 ปีที่แล้ว

      Glad you got it.