cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnnaDewitt
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
Drrickryp
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
Drrickryp
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

Jeff_Thorpe
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (31,980)