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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating Multiple Item...
Power Apps
Unanswered

Updating Multiple Items with Patch - can't use collect

(0) ShareShare
ReportReport
Posted on by

I would like to patch 8-10  textinputs to a Sharepoint that has > 50,000 records.

 

If I patch each OnChange, they patch quickly for the first 6 or so. Then my app almost freezes and wakes up about 60 seconds later.

 

I therefore spent some time looking at patching a collection but given collect is not delegable, I had no success.

 

Does anyone know any way round this? Image attached should it help (patching light blues).

roxannej86_0-1679604342481.png

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @Anonymous ,

    What is your Patch code (in Text please)

  • Community Power Platform Member Profile Picture
    on at

    For the patch OnChange I have been using this:

     

    Set(varRecord,
    Patch(Ind_Vals,{ID:LookUp(Ind_Vals,Quarter = Label1_15.Text && Sector = "Offices" && City = Dropdown1_3.Selected.Value && Indicator = TextInput1_29.Text).ID},{'Indicator Value String':Dropdown1_5.Selected.Value}));


    If(!IsBlank(varRecord),
    Set(
    DisplayPopup3,
    true
    ),
    Set(
    DisplayPopup4,
    true
    )
    );

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    @Anonymous ,

    OK - next question - I am assuming here that it is possible a record has not yet been created and you want a popup only if one exists - the below is a bit of a variation on what you are doing, but gets the Lookup out of the FIlter

    With(
     {
     wID:
     LookUp(
     Ind_Vals,Quarter = Label1_15.Text && 
     Sector = "Offices" && 
     City = Dropdown1_3.Selected.Value && 
     Indicator = TextInput1_29.Text
     ).ID
     },
     If(
     !IsBlank(wID),
     Set(
     varRecord,
     Patch(
     Ind_Vals,
     {ID: wID},
     {'Indicator Value String':Dropdown1_5.Selected.Value}
     )
     )
     );
     Set(varPopup, !IsBlank(wID))
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

     

  • Community Power Platform Member Profile Picture
    on at

    A record exists for all text_inputs - the popup is just to say whether the update has been successful.

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    @Anonymous ,

    In that case

    Set(
     varRecord,
     Patch(
     Ind_Vals,
     {ID: varRecord.ID},
     {'Indicator Value String':Dropdown1_5.Selected.Value}
     )
    );
    Set(varPopup, !IsBlank(varRecord))

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the response. Unfortuantely still having the long delay after patching the 6 text inputs. The dots across the top disappear and I get my popup after 1 second for the first 6 then on the 7th it slows right down as before.

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    @Anonymous ,

    Sorry, no answer to that then - the Patch is the "thinnest" possible except the setting of the Variable - this is a "long shot" and a bit "counter-intuitive" but try this (getting the Variable away from the Patch)

    Patch(
     Ind_Vals,
     {ID: varRecord.ID},
     {'Indicator Value String':Dropdown1_5.Selected.Value}
    );
    With(
     {wID: varRecord.ID},
     Set(
     varRecord,
     LookUp(
     Ind_Vals,
     ID = wID
     )
     )
    );
    Set(varPopup, !IsBlank(varRecord.ID))

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard