cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
knastim
Frequent Visitor

Update SharePoint list based on username on button click

Hi gang!

 

I'm struggling to set up a fairly simple scenario, where I have a SharePoint list with users - and report-status.

The SharePoint list named Users contains two text fields.

* A text field, Title, containing all users displaynames

* A text field, Reported, containing status. Default value is "No".

 

TitleReported
Brad PittNo

 

Now I've added a button - and when it's clicked I wish it to lookup Title based on the PowerApp-user's displayname and change Reported to Yes instead of No.

I've played around with Patch for most of the time - though I'm starting to go in circles and could really use a pointer. 

The following monstrosity is as far as I've gotten; 

 

Patch(Users;LookUp(Users;Title=User().FullName;{Reported:{Value:"Yes"}})

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @knastim try Patch(Users, {Title: User().FullName},{Reported:"Yes"}) or Patch(Users, LookUp(Users,Title= User().FullName),{Reported:"Yes"})

 

hope this helps

 

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @knastim try Patch(Users, {Title: User().FullName},{Reported:"Yes"}) or Patch(Users, LookUp(Users,Title= User().FullName),{Reported:"Yes"})

 

hope this helps

 

View solution in original post

Second formula worked wonders, I wasn't too far from it in other words. Many thanks! 😊

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,530)