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 / Update single record o...
Power Apps
Answered

Update single record of a editform with a button

(0) ShareShare
ReportReport
Posted on by 294

Hello,

i have an edit form that is related from a gallery (source sharepoint list)

 

when i select a single records of gallery, the app open a new screen with a editform linked with detailed datas of selected record.

 

i would like in this editform to update a single field with a button, that switch the value from ‘open’ to ‘closed’.

i have tried with function patch, but i have some errors.

 

thank you all

 

Categories:
  • eka24 Profile Picture
    20,925 on at

    Consider this formula:

    Patch(Datasource,LookUp(Datasource,ID=Value(DataCardValue1.Text)),{StatusColumn:"Closed"})

    Note: Change ID to your unique column in your List

             Change DataCardValue1 to the Textbox on your form

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • gennarodp Profile Picture
    294 on at

    Some questions:

     

    Id is unique Id of Sharepoint list ?

    DataCardValue is a DataCard of what fields ?

    StatusColumn is the column in wich is there open e closed status ?

     

    Thank you

  • eka24 Profile Picture
    20,925 on at

    Id is unique Id of Sharepoint list ? YES

    DataCardValue is a DataCard of what fields ? THE ID FIELD (Textbox) IN YOUR FORM

    StatusColumn is the column in wich is there open e closed status ? YES

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • gennarodp Profile Picture
    294 on at

    ok, it doesnt' work.

  • gennarodp Profile Picture
    294 on at

    the problem is that, the values "open" and "closed" are selected value, not simple text.

     

    How can i resolve it ?

     

    Thank you

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    If it a choice column:

    Patch(Datasource,LookUp(Datasource,ID=Value(DataCardValue1.Text)),{StatusColumn:{Value:"Closed"}})

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • gennarodp Profile Picture
    294 on at

    Thank you very much

  • mbhatt Profile Picture
    525 on at

    i want to use button for change value of choices from sp list and update 

     

    i have gallery which is indicate when i select any record redirect on new screen which is display the dat on form edit . i set the button for change value what i want to with this button . when user click button the existing record change and update again in to app and sp list 

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 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard