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 / Icon Patch +1 to SP List
Power Apps
Answered

Icon Patch +1 to SP List

(0) ShareShare
ReportReport
Posted on by 583

I think I'm making this more complicated than it really is. I would like to have a + icon OnSelect = Patch( to add one to a SP list item. The Icon is not in a form or gallery so I'm struggling with how to get the specific record and then patch a plus one to it. I can filter or lookup a specific record based on a couple text boxes I was trying something like this but it wasn't working.

 

Patch(LookUp('Leader Standard Work',Weeks&'Name ({Name})'=TextInput1_1.Text&TextInput1.Text),{VarViz:+1}) but that clearly doesn't work. Can this be done?

 

Thanks

Categories:
  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    You are on the right track.  First, you need to create a Lookup that will bring back a specific record. Work on that first.  Once you have the lookup working then you just need to do the patch as you are, with a couple changes.

    1) You need to patch all the required fields in addition to VarViz.  For example, Title: is a requried field in SharePoint so you'll need to patch that too.

    2) You need to use the current value of the field when you add 1 to it.

     

    So your code would look something like this.

    Set(recordvalue, Lookup(datasource, criteria));
    Patch(datasource, recordvalue, {Title: recordvalue.Title, FieldtoIncrement: recordvalue.FieldtoIncrement +1})
  • StephenGW Profile Picture
    583 on at

    @Pstork1 

     

    So there is no way to patch only the one field of the item? My items have a lot of fields that I am wanting to patch individually.

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    You don't have to patch all the fields, just all the required fields plus whichever field you want to patch.  Patch will fail if required fields are not included.  In the sample code I'm only patching the Title field and the field you want to increment.

  • StephenGW Profile Picture
    583 on at

    @Pstork1 , Ok I got you. That worked perfectly! Thank you very much!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard