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 / Changing a cell value ...
Power Apps
Answered

Changing a cell value of a sharepoint list by clicking a button in a gallery

(0) ShareShare
ReportReport
Posted on by 13

Hi everybody,

 

I am creating an Power Apps App to track Event Registrations at our Store.

 

If a person cancels its registration I would like to have a button which changes the quantity cell (Anzahl, datatype number) to 0 and it should change the value of the Payment Status (dataype choice field) to another value like "cancelled". If so these to changed fields in the App should also change the color to something like red to see that it is cancelled in first view.

 

List Name: Teilnehmer_Events_PowerApp_2023

Columns to Update: Anzahl (Quantity, datatype number), Zahlstatus (Payment Status, datatype choice)

 

julian11_0-1684661037367.pngjulian11_1-1684661102439.png


Thank you in advance for a hint.

 

Best

Julian

Categories:
I have the same question (0)
  • timl Profile Picture
    37,212 Super User 2026 Season 1 on at

    Hi @julian11 

    You can update the record by calling the Patch function like so:

     

    Patch(Teilnehmer_Events_PowerApp_2023,
     LookUp(Teilnehmer_Events_PowerApp_2023,TN-ID=ThisItem.TN-ID),
     {Anzahl:0, Zahlstatus:{Value:"Cancelled"})}
    )
     
    

    This assumes that TN-ID is the unique identifier. You may need to replace the , characters with ; if you're not using the English version of the editor.

  • julian11 Profile Picture
    13 on at

    Hi @timl ,

    thank you very much.

    It worked. I just needed to remove the bracket at the end, then it worked. 🙂

    Patch(Teilnehmer_Events_PowerApp_2023,
     LookUp(Teilnehmer_Events_PowerApp_2023,TN-ID=ThisItem.TN-ID),
     {Anzahl:0, Zahlstatus:{Value:"Cancelled"}}
    )

     
    I put a pop up window when someone clicks "Storno"(cancell registration). But with a ; or an & Im not able to add the code Set(globalvariable;false). 

    The code should be: 

    Patch(Teilnehmer_Events_PowerApp_2023;
    LookUp(Teilnehmer_Events_PowerApp_2023; ID=galTeilnehmer_Screen4_TN.Selected.ID);
    {Anzahl: 0; Zahlstatus:{Value:"Storniert"}}
    )
    & Set(varShowPopUpStornoTN;false)

    but it does not change the variable to false to hide the pop up.

    julian11_0-1684752694978.png

     

    Looking forward to hearing from you.

    Thanks in advance.

    Best

    Julian

  • Verified answer
    timl Profile Picture
    37,212 Super User 2026 Season 1 on at

    Hi @julian11 

    This would be the correct syntax for that:

    Patch(Teilnehmer_Events_PowerApp_2023;
    LookUp(Teilnehmer_Events_PowerApp_2023; ID=galTeilnehmer_Screen4_TN.Selected.ID);
    {Anzahl: 0; Zahlstatus:{Value:"Storniert"}}
    );;
    Set(varShowPopUpStornoTN;false)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard