Skip to main content
Community site session details

Community site session details

Session Id : q3AEhK/HpwQ3V+xU0e3RST
Power Apps - Building Power Apps
Answered

Set ComboBox Default to Current User and Save in Sharepoint List Person column.

Like (0) ShareShare
ReportReport
Posted on 3 Oct 2019 20:55:38 by

I have a Sharepoint List with a Person column that accepts multiple people.  In my PowerApp I have a Combobox tied to this column that also accepts multiple people.  I have not been able to figure out how to set the default for the Combobox to the current user for a new record.  Any help with this would be appreciated.  Thanks.

Categories:
  • dropkic4u Profile Picture
    24 on 06 Oct 2023 at 22:01:13
    Re: Set ComboBox Default to Current User and Save in Sharepoint List Person column.

    After following the advise of francoisb1, it still was not showing the default value but it did get rid of the error. For it to finally show the default value I had to add "ThisItem.ColumnName" to the DefaultSelectedItems" property. The following is what I have set for it to show the default value in the Combo Box:

     
    I created a editable gallery much like the one Reza has a video on but I use a text label and combo box that I toggle back and forth. One to edit (the Combo Box), and one to view (the text label). 
     
    Items = 
    Office365Users.SearchUserV2({searchTerm:ComboBox2.SearchText,top:10}).value
     
    Default =
    If(
        editGrid = false,
        {
            DisplayName: User().FullName,
            Claims: "i:0#.f|membership|" & User().Email
        }
    )
     
    DefaultSelectedItems = ThisItem.LaptopOwner
     
    The last and only issue I have is having the Combo box save the value back to the list. Being a people picker and having to use a Combo box, that means I have to wrap it in a function to get it to save. Working on that right now and will update on how I got it to work.
     
  • francoisb1 Profile Picture
    21 on 25 Mar 2021 at 08:59:54
    Re: Set ComboBox Default to Current User and Save in Sharepoint List Person column.

    Hi 

    Thank you for the solution.

    My2  cents : 

    I first had a issue when copy/paste it but this is because I didn't have a multi-value Combobox.

    It's obvious but for a single value Combobox, you need to remove the Table part :

    {DisplayName:User().FullName,
    Claims:"i:0#.f|membership|" & User().Email}

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on 10 Oct 2019 at 13:28:28
    Re: Set ComboBox Default to Current User and Save in Sharepoint List Person column.

    Even though I am not using "Forms", I was able to use the red code below from your suggestion.  Thanks!

     

    If(lvarStatus="New",
        Table({DisplayName:User().FullName,
        Claims:"i:0#.f|membership|" & User().Email}),
        RFQAGallery.Selected.SendEmails)

  • Community Power Platform Member Profile Picture
    on 04 Oct 2019 at 12:04:00
    Re: Set ComboBox Default to Current User and Save in Sharepoint List Person column.

    Sorry, I should have mentioned I am not using a form.  Thanks.

  • Verified answer
    RezaDorrani Profile Picture
    12,141 on 03 Oct 2019 at 21:20:59
    Re: Set ComboBox Default to Current User and Save in Sharepoint List Person column.

    Hi @Anonymous ,

     

    Set the default property of the data card to

     

    If(FormName.Mode= FormMode.New ,Table({
    DisplayName: User().FullName,
    Claims: "i:0#.f|membership|" & User().Email
    }),ThisItem.PPFieldName)

     

    where FormName = name of your form

    PPFieldName = column name in SP

     

    --------------------------------------------------------------------------------
    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.

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1