PowerApps Patch Function

Поділитися
Вставка
  • Опубліковано 5 вер 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!

  • @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.

  • @fidomcvitie9418
    @fidomcvitie9418 3 роки тому +1

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

  • @paulmoody4599
    @paulmoody4599 5 років тому +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. 👌

  • @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. 😎

  • @diegoacevedo1778
    @diegoacevedo1778 3 роки тому +1

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

  • @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 (

  • @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.

  • @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⚡⚡

  • @Productivity365
    @Productivity365 3 роки тому +1

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

  • @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. 🐶

  • @wikiexpert
    @wikiexpert 5 років тому +1

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

  • @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.

  • @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!

  • @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

  • @danielwatson7974
    @danielwatson7974 4 роки тому +1

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

  • @robertz.180
    @robertz.180 4 роки тому +1

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

  • @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.

  • @tribalhunter2978
    @tribalhunter2978 4 роки тому +1

    Bless your soul for these videos 🙏

  • @hayleeadamson6449
    @hayleeadamson6449 2 роки тому +1

    Another great video! Thank you!

  • @reypangilan7157
    @reypangilan7157 4 роки тому +1

    Thanks Shane. great video.

  • @Nze02
    @Nze02 3 роки тому +1

    Finally I got the solution I've been searching for. Thanks alot

  • @ricci.hidalgo
    @ricci.hidalgo 3 роки тому +1

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

  • @luisbaldassoio
    @luisbaldassoio 4 роки тому +1

    Thanks Shane for your help.

  • @searchingyt4246
    @searchingyt4246 3 роки тому +1

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

  • @RichBoud1
    @RichBoud1 4 роки тому +3

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

  • @galinagolant
    @galinagolant 3 роки тому +1

    Cool video!!! Helpful hints!!!

  • @carolerlston3876
    @carolerlston3876 2 роки тому

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

  • @lizawejlemand3302
    @lizawejlemand3302 3 роки тому +1

    Great stuff! Would be nice to see an example on how to copy a record from a gallery or a form and create a new item... :)

    • @ShanesCows
      @ShanesCows  3 роки тому +2

      I like it. I will add that to my video list. Thanks

  • @davysmets2138
    @davysmets2138 5 років тому +1

    I enjoyed both, the little tricks and learning about patch ;-)

  • @cchristoff
    @cchristoff 6 років тому +1

    Great video and fun delivery. Looking forward to your next videos.

    • @ShanesCows
      @ShanesCows  6 років тому

      Thanks. I try not to be boring.

  • @user-rt3fw5jw8l
    @user-rt3fw5jw8l 10 місяців тому

    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?

  • @tenisviejos
    @tenisviejos 5 років тому +2

    Dude, are you a wizard? Thanks for such a great video!

    • @ShanesCows
      @ShanesCows  5 років тому +1

      No problem glad you liked it

  • @danulienka4030
    @danulienka4030 4 роки тому +1

    Thank you, Shane... Your videos are great, you cut to the chase. Awesome work :-)

  • @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.

  • @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.

  • @gerusnero
    @gerusnero 6 років тому +1

    good job shane. I was almost hoping to see you patch a person field entry to the SP list :D

    • @ShanesCows
      @ShanesCows  6 років тому

      Thanks. I probably should have included that. 😑 I will find a way to sneak it into a different video.

    • @gerusnero
      @gerusnero 6 років тому +1

      no prob, I guess it works much the same way and I just had some typo somewhere

    • @cztop54
      @cztop54 6 років тому

      That's is what I need! Have you done that video yet? Thanks so much for all your help!

  • @sarankumar3753
    @sarankumar3753 4 роки тому +2

    Hi Shane,
    Its really nice videos. i have learn a lot. if possible can you please do more videos on Flows.

    • @ShanesCows
      @ShanesCows  4 роки тому

      I will try. 😀

    • @sarankumar3753
      @sarankumar3753 4 роки тому

      @@ShanesCows thanks Shane for your reply.
      Also if possible do videos on SPFx extensions :)

  • @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. ua-cam.com/video/HUX_0AA4-Hs/v-deo.html

  • @riasrivastava7146
    @riasrivastava7146 4 роки тому +1

    Really helpful video!

  • @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 😀

  • @EricEwers
    @EricEwers 5 років тому +5

    This has been a tremendous help to me, thank you so much!

  • @puppydood
    @puppydood 3 роки тому +1

    Thank you. Can you do a video on how to bulk patch a gallery with one button? 😊

    • @ShanesCows
      @ShanesCows  3 роки тому +1

      Like this? ua-cam.com/video/0xZ4fMJbLvk/v-deo.html

    • @puppydood
      @puppydood 3 роки тому

      @@ShanesCows Yes!!! Fab thanks!

  • @davecawthorn2234
    @davecawthorn2234 6 років тому +1

    Colour - way to go Shane!!

    • @ShanesCows
      @ShanesCows  6 років тому +1

      I also like behaviour :)

  • @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

  • @taellis2
    @taellis2 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

  • @juanp.ortizm.3018
    @juanp.ortizm.3018 2 роки тому +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  2 роки тому

      This will show you the way ua-cam.com/video/gsk14D-CYRE/v-deo.html

  • @Daltmaly
    @Daltmaly 2 роки тому +1

    THANK YOU !! YOU'RE THE BEST

    • @ShanesCows
      @ShanesCows  2 роки тому +1

      Happy to help. Have a great day. 🐶

  • @sanjeevtiwari17
    @sanjeevtiwari17 4 роки тому +1

    Thanks Shane for this video.I request you can you please make a video for error handling with Patch function.

    • @ShanesCows
      @ShanesCows  4 роки тому +1

      That isn't a bad idea. 😊 Thanks

  • @officehowto
    @officehowto 5 років тому +1

    Shane, many thanks for the amazing video.

  • @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.

  • @aikiart3
    @aikiart3 6 років тому +1

    Thanks very clear and concise!!!

  • @JT-sr7fp
    @JT-sr7fp 3 роки тому +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  3 роки тому +1

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

  • @ramisolipe7001
    @ramisolipe7001 3 роки тому +1

    I like this Video a lot , ohhh. If there is any update for this video , please make another one .

    • @ShanesCows
      @ShanesCows  3 роки тому

      Patch hasn’t changed so you should be good.

  • @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. ua-cam.com/video/HUX_0AA4-Hs/v-deo.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

  • @s961201
    @s961201 3 роки тому +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  3 роки тому

      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.

  • @RobertNeptune
    @RobertNeptune 6 років тому +1

    Hi Shane! First of all, Great work, This videos really help! I'm stuck on a really tricky issue here. I'm working on a SharePoint list which holds hiring data. In the list, there is a column named "IsInvited" , which is a choice type data with 2 options, "Not Yet" and "Already Invited". I build an app for this list, and on the detail screen, I insert a button to send an invitation email and to switch this item's IsInvited Choice from "Not Yet" to "Already Invited". Since the button is outside the edit form (In fact the button is on EmailPreview_Screen, we'd like the operator to see the email before he/she send it.) and it naturally can not benefit from the "ThisItem" feature like what you did here. I find it very confusing when trying to refer to the item I want to patch out side the gallery. And the patch function here is really tricky since the Choice type is a complex data type. I tried to find documents addressing this issue all over the internet, and so far there is few. I wonder if you are kind enough to do an episode to really break down the patch function to its core for us new learners. I think a lot of people will appreciate.

    • @ShanesCows
      @ShanesCows  6 років тому

      How did they find the record? If it was a gallery you can use gallery1.selected for the record to patch.

  • @churrascowonton6789
    @churrascowonton6789 5 років тому +1

    Thank you so much, Shane. I learned a lot from this!

  • @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.

  • @RakeshDas-zk3sp
    @RakeshDas-zk3sp 4 роки тому +1

    Terrific Content

    • @ShanesCows
      @ShanesCows  4 роки тому

      Thank you ☺️

    • @RakeshDas-zk3sp
      @RakeshDas-zk3sp 4 роки тому

      @@ShanesCows Hi Shane,
      Would you be kind enough to help me out on a combobox issue?

  • @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

  • @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

  • @Vihushrihu
    @Vihushrihu 3 роки тому +1

    You are awesome !

  • @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. 🐶

  • @safiyap4085
    @safiyap4085 4 роки тому +1

    Edit Form - How to replace a default control with a custom control? Once custom control is used, how this value can be updated to list on the click of default "save" button?

    • @ShanesCows
      @ShanesCows  4 роки тому

      This video shows that ua-cam.com/video/43ekj5MlNJU/v-deo.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 !

  • @capucinevetter8681
    @capucinevetter8681 3 роки тому +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  3 роки тому

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

  • @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.

  • @remisuszkiewicz5543
    @remisuszkiewicz5543 4 роки тому +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  4 роки тому

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

  • @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 ua-cam.com/video/gsk14D-CYRE/v-deo.html

  • @lorenasanchez7581
    @lorenasanchez7581 2 роки тому

    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.

  • @prateeksharavi4820
    @prateeksharavi4820 4 роки тому +1

    How do I distinguish between patching an existing record to sharepoint such that it doesn't create a new line in my sharepoint list? How do I differentiate this from when I do have a new form and want to create a new record?

    • @ShanesCows
      @ShanesCows  4 роки тому

      Patch(datasource, Defaults(datasource), {column: value}) makes a new row. Patch(datasource, Lookup(datasource, ID =1), {column:value}) patches an existing record.

  • @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

  • @rozhinimani9249
    @rozhinimani9249 3 роки тому +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 3 роки тому

      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  3 роки тому +1

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

  • @MrIke1214
    @MrIke1214 4 роки тому +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  4 роки тому +1

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

    • @MrIke1214
      @MrIke1214 4 роки тому

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

  • @actuallyba
    @actuallyba 5 років тому +3

    Hi Shane, how can I adress an existing entry in a Sharepoint list? I have a fix list with employees and want to change the amount of days of leave. I tried the following: Patch(AmountofHolidays;{WorkersName: User().FullName};{Available: 2}.
    But instead of editing the existing row, it creates a new one.
    Thanks for out help and greetings from Germany

    • @ShanesCows
      @ShanesCows  5 років тому +1

      You need to add a lookup in the middle to tell it which record. Patch(SharePointList, Defaults(SharePointList),{column:value})

    • @actuallyba
      @actuallyba 5 років тому

      @@ShanesCows Thanks a lot!! It worked!

    • @jameskrull764
      @jameskrull764 5 років тому

      @@ShanesCows Hi Shane, I'm having a similar issue. I am updating a table record in a OneDrive Excel sheet but using the SubmitForm button to update a form and calculate an overall average field in my table based on the form inputs.
      I tried using your command above Patch(Table1, Defaults(Table1), {'Overall Score':(CCValuePropScore.Text* 0.5 + DeliverOutcomesScore.Text*.5)}); SubmitForm(EditForm1)
      However it keeps on saving a new record instead of updating the record that the form is displaying.
      thanks for the great content your videos are fantastic!
      EDIT: Solved this using the following command Patch(Table1, 'Client List Display'.Selected, {'Overall Score': (CCValuePropScore.Selected.Score*0.1 + LOBGrowthScore.Selected.Score*0.1 + RevenuesGrowthScore.Selected.Score*.2 +ClientSatScore.Selected.Score*.25 + DeliverOutcomesScore.Selected.Score * 0.25 + ActivelyTrackScore.Selected.Score * 0.1)}); SubmitForm(EditForm1)
      The key takeaway is I used the 'Item' value in the Editform card, in my case this was called 'Client List Display'.Selected. It was as simple as calling this variable as the BaseRecord in my Patch command. then using the other fields to calculate a weighted average and update my overall score variable in the OneDrive Excel document

  • @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!

  • @MrWonderfulChris
    @MrWonderfulChris 3 роки тому

    Hi Shane - this was great - very helpful! In this same example that you have here, can you show how to patch an attachment back to your SharePoint list without using the Azure connection? Thanks

  • @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 4 роки тому +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

  • @rochellenicholson6372
    @rochellenicholson6372 3 роки тому +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  3 роки тому +1

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

  • @smartin8707
    @smartin8707 4 роки тому +1

    You've been a life saver Shane...question for you: Is there a way that when you hit Edit, only the Submit/Save button pops up for the card that you want to edit in the gallery? I like the function but for every card I hit edit on, it shows the Save button in every card of the gallery. Little confusing for my users. Help! :)

    • @ShanesCows
      @ShanesCows  4 роки тому

      Yes but you have to write the logic to make it work. Not fun but possible.

  • @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? 😋

  • @Balrog74Fr
    @Balrog74Fr 4 роки тому +1

    Hi, I'm facing a problem. On my Save button after the patch function I want to add reset and refresh functions. If I split my functions with a ; (french version for the ,) then the code after the ; is not recognized and I have an error about unattended characters. If I split the functions with AND or & like I do for everywhere else the code is recognized but then the button doesnt work at all...

    • @ShanesCows
      @ShanesCows  4 роки тому

      In French where I use a , you use a ; and where I use a ; you use a ;;

  • @FelipeSoler23
    @FelipeSoler23 6 років тому +1

    Good Video. I have a performance problem with a Patch for many records. I try to bulk insert into a SQL Database for a 64 records by user.

  • @PACWESTVB
    @PACWESTVB 2 роки тому +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  2 роки тому

      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  2 роки тому

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

    • @PACWESTVB
      @PACWESTVB 2 роки тому +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  2 роки тому

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

  • @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? ua-cam.com/video/BnzaSDYl8mA/v-deo.html

  • @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.

  • @alfredmeza9042
    @alfredmeza9042 4 роки тому +1

    Hi, 1st of all thanks for all your videos!! 2nd I am a little confused with the "LetsEdit" variable...I see you defined the value to true...but then you replace that for "!LetsEdit"...so how the variable knows that has to chance from true to false and viceversa?

    • @ShanesCows
      @ShanesCows  4 роки тому

      ! Is the opposite of a Boolean. Shane =!Shane stores the opposite of what was on the variable. So if it was false it becomes true

  • @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. 😀

  • @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  4 роки тому

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

  • @neerajcoolcs055
    @neerajcoolcs055 4 роки тому +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  4 роки тому

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

  • @kannankarmegam-bne
    @kannankarmegam-bne 5 років тому +1

    Thanks Shane. Awesome

  • @naveenkrsharda
    @naveenkrsharda 4 роки тому +1

    Thnaks Shane But I am Facing one Problem which is ---Updating DropDown Column of Collection2 to Number Column of Collection1
    Hi,
    As beginning I have attached the List to the gallery & Copied the Selected Row (all Columns) as per my choice into Collection(ChooseItems) in one Screen. I have selected many rows from Gallery and copied one by one into the Collection(ChooseItems). And in another Screen(Screen 2nd) I have displayed them with required columns only. Now in this screen (Screen 2nd) I have put an Edit Icon,If any Item((Record) say Quantity) require to change, a new screen (Screen 3rd) gets open with that Selected Item(record) which is copied into new Collection(POEDIT). Here I have created a new DropDown and Update the Quantity Rest details are static. Now My problems Starts, Here I am Unable to Update the POEDIT(Collection) Quantity Value with ChooseItems(Collection).
    I have Tried too much.
    Here DDQTYEDIT(which is drop-down) is from Screen 3rd and DDQuantity is DropDown of Screen 2nd comes from ChooseItem collection and Quantity is number type column also comes in ChooseItems Collection. LGal2EditITEMNAME.Text is Product Name (the Label defined in Screen 3rd) and Name is exist in Collection ChooseItems.
    Please note that all the Items(Records) get copied from SharePoint List While Selection from Gallery.
    As Follows.
    On the Click of "Accept ICON", I have run the following commands one by one
    (1). Patch(ChooseItems, First(Filter(ChooseItems,Name=LGal2EditITEMNAME.Text)),{DDQuantity:DDQTYEDIT,Quantity:DDQTYEDIT.Selected.Value})
    (2). UpdateIf(ChooseItems,ThisItem.Name=LGal2EditITEMNAME.Text,{DDQuantity:DDQTYEDIT,Quantity:Value(DDQTYEDIT.Selected.Value)})
    (3). UpdateIf(ChooseItems,ThisItem.Name=LGal2EditITEMNAME.Text,{DDQuantity:DDQTYEDIT,Quantity:DDQTYEDIT.Selected.Value})
    (4). Patch(ChooseItems, Gallery2.Selected,{Quantity:DDQTYEDIT.Selected.Value}) This Gives Error
    Rest from 1 to 3 commands are not updating.. the Quantity Column Value.
    Need Help Urgently.
    Appreciated in Advance....

  • @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 ua-cam.com/video/MclJ_O9HvJQ/v-deo.html

  • @74popette
    @74popette 4 роки тому +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  4 роки тому

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

  • @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.

  • @MrDonduro
    @MrDonduro 3 роки тому +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  3 роки тому

      Sorry I don’t follow the question.

  • @sa3idi69
    @sa3idi69 4 роки тому +1

    Hi, How can I update multible record in a database using galarey control, for example ( list of student has a check box for attendance the class, I want check the absents then save the all records that I've checked)

    • @ShanesCows
      @ShanesCows  4 роки тому

      Try my latest video. I show exactly that. 😎 PowerApps ForAll Function - Select multiple records in a gallery and Patch ua-cam.com/video/0xZ4fMJbLvk/v-deo.html