Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Update SharePoint column

(0) ShareShare
ReportReport
Posted on by 139

Hello Guys,

 

I want to update a Colum field in SharePoint when a button is selected. As a example.

Column1 has a Value "True". When user confirm button the value should be "false".

 

Is it also possible to Update the field with the Username with the User().FullName function?

 

Thanks in forward and best regards

Categories:
  • v-monli-msft Profile Picture
    on at
    Re: Update SharePoint column

    Hi @Belasor,

     

    This is because that Office365Users.UserProfile(InfoAbout.Text).DisplayName is used for Office365 user connector. The user profiles need to be extracted from AzureAD, you cannot use it on SharePoint person/group column.

     

    Regards,

    Mona 

  • Belasor Profile Picture
    139 on at
    Re: Update SharePoint column

    Thank you for your great answer.

     

    But I have a problem with the _UserProfile.DisplayName function. It´s also not working with

    In the SharePoint list "bookedby" is a person/group column

    I tried it with a single line column and it´s working but i would like to have this into a Person column. Is it possible?

    Thanks in forward.

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Update SharePoint column

    Hi @Belasor

     

    Yes it is posible, you can use Patch() function for this.

     

    To update your record you will need to put forumla similar to this in your Button.OnSelect property:

     

    Patch(
     YourSharePointList,
     Gallery1.Selected,
     {
     Column1:false,
     ColumnUser:User().FullName
     }
    )

    In Patch() function first you say which list to patch (YourSharePointList). 

    Then you specify which record in that list to patch (Gallery1.Selected), if your items are not from gallery. You can do a lookup to find the record to patch:

    Patch(
     YourSharePointList,
     LookUp(YourSharePointList,IDColumn = IdentificationVariable),
     {
     Column1:false,
     ColumnUser:User().FullName
     }
    )

    Where IDColumn is a column in SharePoint List with which you can identify records and IdentificationVariable is a variable assigned in PowerApps to match records.

     

    And then you specify which columns to change.

     

    Some notes:

    User() function can sometimes slow down your app and it is suggested to save your current user into a global variable and use through the app.

     

    To do this you would put something like this in the Screen.OnStart or OnVisible property:

     

    Set(
     _UserProfile,
     User()
    )

    Then you can just use _UserProfile.DisplayName to get the name or _UserProfile.Email to get email.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard