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

how to update particular columns in sharepoint from powerapps

I've a SharePoint list which has the following columns- UserName(Title), engagement, type of update, last updated

 

I wish to update only - engagement, type of update, last updated matching the username in the sharepoint list.

 

I'm currently trying to capture the user name with following formula- Office365Users.MyProfile().DisplayName and matching it with the list by- If(ThisItem.Title = Office365Users.MyProfile().DisplayName, DataCardValue4.text) which does not work the way intended.

I'm also attaching the screenshot of my list which has to be altered. Thanks in advance.

9 REPLIES 9
WarrenBelz
Super User
Super User

@kavya__ ,'

You did not say where this code is or what you are trying to do with it, but you do not need the office connector as PowerApps has the User().FullName built-in. This however is not Delegable, so you can do this

With(
   {wUserName:User().FullName},
   If(
      ThisItem.Title = wUserName, 
      DataCardValue4.Text
   )
) 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Where do I write this code @WarrenBelz , at the update property of the data card ?

@kavya__ ,

The same place as you have your current code - I simply changed the syntax to something I knew would work. You have not said (as I mentioned) where you were using this or why.

It would however work on a Card Update, but I still don't clearly understand exactly the logic you are trying to apply.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

kavya___0-1600083940506.png

this is the snapshot of the app, I've created this form by connecting it to my list. 'your name' here is static and is referred to as 'user name' in the list , and I wish to update the other columns if the 'user name' matches with 'your name' from this form. The code you provided, did not work in the update property. LMK if there is a work around.

 

Much thanks. @WarrenBelz 

@kavya__ ,

When you say "update the other cards", when do you want this to happen - do you have a "save" button?

Also which field is contained in  DataCardValue4.Text? 

@WarrenBelz ,

 

There is a submit button on the top, I want the list to update as soon as the person submits the form.

 

DataCardValue4.Text is under engagement field. 

 

'User Name' in the list should act as a primary column, and if 'your name' matches 'user name' then the list should update the other fields.
Thanks in advance.

@kavya__ ,

So that i have this straight, SubmitForm (save) will submit all fields in the form.

If the user name matches the name, what exactly do you want in Engagement and it it does not match what fields do you want updated/not updated?

@WarrenBelz ,

 

If the user name matches the name, then whatever value that the user selects should be reflected in the sharepoint list under engagement, update type and last updated. There is no static values for these columns, the user gets to select that!

 

@kavya__ ,

I think I understand what you want here - if the user name matches the Title field, also put the user name in Engagement?

The Default of Engagement is the correct place

With(
   {wUserName:User().FullName},
   If(
      ThisItem.Title = wUserName, 
      wUserName
   )
) 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,338)