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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,766)