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 Apps
Unanswered

Patch error

(0) ShareShare
ReportReport
Posted on by 118

Hello,

I'm going to try set the stage, since I'm new here.

I have a Microsoft List with less than 100 records.

 

Screen1

I filter this list through a Text input box 

Default = ""

I then use a button to initiate the search / filter

OnSelect = UpdateContext({varSearch:'sbox - ID'.Text})

This will filter a gallery

Items = LookUp('ThankYouCardList',IsBlank(varSearch) || false || ID = varSearch)

I chose LookUp because there maybe multiple ID's that are the same and I only need the first one to confirm the ID.

Screen2

On this screen it captures the ID from sbox - ID in a Text Label

This also is the criteria for filter another gallery that only displays the items with the particular ID.

There can be 1 to 5 items listed in this gallery.

In this gallery I have inserted a Checkbox to indicate if this task is complete.

Remember there can be multiple tasks and each item in the gallery has it's own Checkbox.

I am using Patch to try update the specific record in the Microsoft List

OnCheck = Patch('ThankYouCardList', ThisItem, {Completed:If(Self.Value,"Yes","No")})

OnUncheck = false

OnSelect = Select(Parent)

Text = If(Self.Value,"Card Completed","Check box when Card is completed")

I tried this originally with Excel as the data source and it seemed to work fine, but when I chose a Microsoft list this will not update the record.

 

So with the information above, I'm reaching out for assistance on why this is not updating the record?

 

Here's a screenshot of that last screen.  I cleared out some content but left all structure in place.

Jeffrey_H_0-1686606066561.png

If one check box is marked this is what it should look like

Jeffrey_H_0-1686606454570.png

With the Submit button I would like to update the record in the Microsoft List and then reset the first screen.

Clearing out the input text box and the first gallery.

Also navigating to the next screen that is a Label screen saying thank you

Screen 3

This is for the user to confirm completion and exit the program

Jeffrey_H_1-1686606909714.png

 

Hopefully this may help someone get me on the right track.

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @Jeffrey_H ,

     

    Is this the Patch you are struggling with?

     

    Patch('ThankYouCardList', ThisItem, {Completed:If(Self.Value,"Yes","No")})

    What is Datatype of the Completed field in List? Boolean or Choice or Text?

     

     

  • Jeffrey_H Profile Picture
    118 on at

    Yes the Patch above is the one I'm struggling with.

    also

    Completed is a Choice field Yes or No

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    If it is a choice field, try this.

    Patch('ThankYouCardList', 
    ThisItem,
    {Completed:
     If(Self.Value,
         {Value:"Yes"},
         {Value:"No"}
        )
    }
    )

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard