cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Share Point List Row Update Problem

Hello. I have a SharePoint List and PowerApps app which is created from this list which consists of standard Browse, Detail and Edit Screens. I added Accept and Decline buttons to Detail Screen. I am thinking that a manager will browse list and select one of row in the list and go to detail screen. There will be accept and decline buttons in this detail screen. If the manager clicks accept button, "Status" column of relevant row will be "Accepted" I used this code at OnSelect section of button:

 

Patch(RequestEdit; First(RequestEdit); {Status: "Accepted"});;

 

But this code changes status of first row of my sharepoint list. I couldn't find a way to change it to selected row. How can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

@AnnaDewitt 

What if you put a checkbox inside the gallery and made its OnCheck property Patch(RequestEdit; ThisItem;{Status:"Accepted"})?

Otherwise, you need to fix your patch to

Patch(RequestEdit; Lookup(RequestEdit;ID=Gallery1.Selected.ID); {Status: "Accepted"});;

View solution in original post

4 REPLIES 4
Super User II
Super User II

@AnnaDewitt 

What if you put a checkbox inside the gallery and made its OnCheck property Patch(RequestEdit; ThisItem;{Status:"Accepted"})?

Otherwise, you need to fix your patch to

Patch(RequestEdit; Lookup(RequestEdit;ID=Gallery1.Selected.ID); {Status: "Accepted"});;

View solution in original post

Super User
Super User

Since you are on the detail screen you change the "First(RequestEdit)" in the Patch statement to whatever formula is used in the Item property of the DetailForm. It will be something like BrowseGallery1.Selected

 

Example:

Patch(RequestEdit; BrowseGallery1.Selected; {Status: "Accepted"});;

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thank you so much! Your Patch code is working. I am wondering, do I have to have visible ID column on SharePoint to bu able to use this column or can I turn this column to unvisible?

There no need to unhide the ID column in SharePoint to see it in PowerApps. 

 

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (25,979)