Skip to main content
Community site session details

Community site session details

Session Id : 79uV432tlOjX/DDtKbjx7L
Power Apps - Building Power Apps
Answered

Patch behaving strangely for first row only

Like (0) ShareShare
ReportReport
Posted on 29 Aug 2018 05:59:12 by 61

Hi,

 

I am using a gallery view so that a user can either Confirm or Reject a row/record using two toggle buttons that patch the result of the toggle to a column. This then in turn kicks off a MS Flow which copies the record to a different list and deletes it from this list.

 

Up until recently I believe it was behaving as expected but I am now seeing the following behaviour; if I confirm or reject the record on the first item in the gallery it changes the toggle on all items, however if I do the same for any other record it only updates that record.

 

Worth noting I have a relatively complex Sort and filter on the gallery that gives me a delegation warning but I am only working on a very limited number of records so don't think this is the issue.

 

Has anyone else seen this issue?

 

Example of patch which is Reject OnCheck:

 

Patch('Match List_1',First(Filter('Match List_1',ID=ThisItem.ID)),{Reject_x003f_:true})

Example of patch which is Confirm (also patches a date):

 

Patch('Match List_1',First(Filter('Match List_1',ID=ThisItem.ID)),{Confirm:true,Actual_x0020_Date:DatePicker1.SelectedDate})

If it is working for every other record, why would the ThisItem ID for the first record be causing a problem?

 

Thanks

 

 

 

 

Categories:
  • Verified answer
    mnmsymmons Profile Picture
    61 on 29 Aug 2018 at 21:54:01
    Re: Patch behaving strangely for first row only

    Thanks @Meneghino

     

    I have updated the patches accordingly but still seeing the same issue, I check the toggle in the first item and it automatically updates the toggle for all items.

     

    The Delegation issue related to a complex sort and filter for the Items property. It's because there is a StartWith inside a SortByColumns but I think this is unrelated.

     

    Update - I deleted my toggles and set them up again from scratch - it now works.  Whether there was some property I had inadvertantly changed or not I don't know.

  • Meneghino Profile Picture
    6,949 on 29 Aug 2018 at 09:36:28
    Re: Patch behaving strangely for first row only

    Hi @mnmsymmons

    This may or may not resolve your strange beahviour, but should certainly improve your peformance and will probably get rid of the delegation issue as well.

     

    Reject OnCheck

     

    Patch('Match List_1',{ID: ThisItem.ID},{Reject_x003f_:true})

    Patch which is Confirm

    Patch('Match List_1',{ID: ThisItem.ID},{Confirm:true,Actual_x0020_DateatePicker1.SelectedDate})

     

    Please let me know how you get on.

    Reference to a similar issue is here:

    https://baizini-it.com/blog/index.php/2018/01/11/powerapps-replace-the-defaults-function-to-improve-performance/

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2