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 / Newbie trying to patch...
Power Apps
Answered

Newbie trying to patch a rown in a gallery and change its status from active to inactive

(0) ShareShare
ReportReport
Posted on by 48

Haven´t been on canvas apps and Power fx for ages... I have an app that makes a booking/reservations of seats.

 

- I have a gallery already filtered showing the rows of active "bookings" .  gallery_myCurrentBooking

The formula is

 

First

   (Sort

        (Filter(´My Bookings´, Status=´Status (My Bookings)´.Active), ´Created on´, SortOrder.Descending))

 

Here I want to further filter to show me only "my" bookings based on my user().email

 

The main issue though is:

 

- I would like to add a button and "onSelect" to patch or change the selected row and change its status to "inactive". I am trying the 

 

Patch(

´My Bookings´,

               LookUp(´My Bookings´, ID = gallery_myCurrentBooking.Selected.ID), {Status: "Inactive"} )

 

But I do not understand how to get the ID of that particular row or whether there is another way about it. It's a row in Dataverse with the booking name, date from to, user and status.

 

 

Grateful for any assistance

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @FaroukM - given a Gallery selection can also return a record, there is no need to use a LookUp function.

     

    For example you can use:

     

    Patch(
     'My Bookings',
     gallery_myCurrentBooking.Selected,
     {Status: 'Status (My Bookings)'.Active}
    )

     

  • F.Mogheth Profile Picture
    48 on at

    Thanks a lot >}{

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @FaroukM - please remember to accept the solution so that others with a similar question can quickly find the solution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard