web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch Function to Upda...
Power Apps
Unanswered

Patch Function to Update the whole list with a button

(0) ShareShare
ReportReport
Posted on by 34

Hi,

 

I'm building this app and would like to update the whole list in sharepoint with one button. From my searches Patch Function can do it. My Challenge is I'm using flows to send text messages and the trigger event is the Sharepoint List being modified and with a IF condition met. I would like to set the variable involved in the Flow IF Condition with the the Patch function so I apply that varaible to the whole list at once and it's blasts and email.

 

Any Ideas.

 

Thanks!

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @drallam2,

     

    If you mean that you want to pass variable from Flow to PowerApps, then I'm afraid that this cannot be achieved so far. Please consider to post an idea in the PowerApps Ideas forum, so it might be considered for future releases.

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

    If my understanding is incorrect, please feel free to tell.

     

    Regards,

    Mona Li

  • drallam2 Profile Picture
    34 on at

    @v-monli-msft I meant the other way around. Sorry for not explainning it correct. I want to pass variable from Powerapps to update the Sharepoint list and once there's a change in Sharepoint, Flow can be triggered.

    I'm struck at how to update the whole list in sharepoint with a button in Powerapps.

     

    I hope this helps you understand the problem

     

    Thanks! 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @drallam2 --

    I don't get why you think Patch() is required to do what you want to do. Assuming the trigger for the Flow is an update of the Sharepoint List, then Patch() isn't required since both these functions, Patch() and SubmitForm(), both do updates.

     

    In the event that you need some data from PA for the Flow, it's trivial to just add in some code after the SubmitForm() call. Something like this on the OnSelect or OnSubmit property (Not entirely sure which):

    SubmitForm( ... );
    ThatFlowYouWant.Run()

    Also -- in case you didn't know, if you add a parameter called "Ask in PowerApps" in your Flow, that Flow automatically becomes a possible connector for PowerApps. Although, you would still need to manually add it to your app. 

     

    P.S. SubmitForm() is the default submission method for templates. It definitely takes away the complexity but in sacrifice of control. For most part, there have been improvements with Sharepoint - PowerApps collaboration, so there's most likely no need for Patch() unless you have very specific requirements.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Oh. Now that I've read your post again -- it seems that you aren't aware of forms in PowerApps (or I might be wrong and somewhat hallucinating). 

     

    Tip: Forms in PowerApps had recent improvements to work with Sharepoint Lists. i.e. You can create a Form object, set the DataSource property to your Sharepoint List connector, and PA will automatically build the forms and submission methods for you. That SubmitForm() I was talking about? It'll add that automatically too. 

     

    Another tip: Don't snooze and type. Lol.

  • drallam2 Profile Picture
    34 on at

    @Anonymous  Thanks for reply. So I use Forms and submit form to update my Sharepoint list. The challenge is although the person makes the change, he/she will see a overall summary of the changes more like a preview and if he/she doesn't like the hanges they will change it again and when they are happy with the results. The final step is to hit the button (in powerapps) which blasts out text messages per line in the sharepoint list based on a condition in Flow  (if Column "A" value ="SEND") then the Flow triggers.

     
    Is there a way to update a "Single Line Type" column" A" in sharepoint list from powerapps with "SEND" for the whole list at once? And as you said is Patch() even suitable for this operation?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @drallam2 --

    To be honest, I have no idea what you want to do with PowerApps. You lost with the blast and everything after that.

     

    Here's what I sort of got. Listed below is the flow you want to go with (Not MS Flow):

    1. User goes to EditForm in PowerApps and adds changes
    2. User clicks on Submit Button. The form doesn't apply the changes immediately but directs the user to a summary page of sorts, asks User to confirm presented changes.
    3. If User is not happy, go back to Step 1. If otherwise, ???.

     

    Let's backtrack since we seem to hold different assumptions...

    • Is the Edit Form only for a single record? If so, what's with the text message per line?
    • Are you trying to edit a bunch of records/rows at once?
    • If you can and want, can you describe your data structure (i.e. your tables, columns, etc.) here.

     

    @v-monli-msft -- He seems to have mistyped in first post. We might need your help in this one.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @drallam2 --

    Sorry. I was being stupid. I understand your first post in this thread better now.

     

    So, one thing -- You can't just use Patch() to update multiple records. What you can do, however, is use Patch() together with ForAll()In something like this:

    ForAll( RenameColumns( YourDataSource, "ID", "LoopID" )
     Patch( YourDataSource, LookUp( YourDataSource, ID = LoopID ), {
     // New values and such.
     }
    )

    Although, I haven't really needed this exact function for mine so it would mostly likely need some tweaking. I'm tagging @hpkeong since dealt with this thing before.

  • drallam2 Profile Picture
    34 on at

    HI @Anonymous 

     

    Sorry for getting on this so late. Let me explain the last part. I wanted to trigger a MS Flow based on items being modified in a shrepoint list. The MS flow sends the text messages to a group of people (each one of the Sharepoint list) at once.

     

    What I want to do with Powerapps is use it as an interface to modify the sharepoint list and also to trigger that MS Flow as mentioned above.

    Yes the steps which you listed is excatly how i'm envisioning the app to be used.

    1. Editform in powerapps and add changes (in Database1)
    2. The user sees a preview of the submitted changes (in Database1)
    3. If user not happy editform in powerapps again (in Database1)
    4. If user is happy with the changes, hit a button in powerapps, adds a "SEND" text value to a particular column (SingleText Type) (in Database1)
    5. That "SEND" value trigger the MS Flow and sends a text to every body.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard