cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Default value of combo box

How do I make the combo box's default value to current user?  For instance, the source is a people picker field (SharePoint Online) with below settings:
2019-06-10_1253.png

I added Office365Users as data source, and set the DefaultSelectedItems property - gave an error expected table value

Office365Users.UserProfile(User().Email).DisplayName



1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Default value of combo box

Hi @Tamras ,

 

Actually you do not need to add Office365 Users to set the default value to current user for SharePoint people field. Simply use below formula in the Default property of the dropdown control in people field's data card:

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

And if you want the dropdown still shows the original value when editing an existing item, use below formula instead:

If(Text(EditForm1.Mode)="1",{ 
  DisplayName:User().FullName,
  Claims:"i:0#.f|membership|" & Lower(User().Email), 
  Department:"", 
  Email:User().Email, 
  JobTitle:"", 
  Picture:""
},Parent.Default)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Default value of combo box

Hi @Tamras ,

 

Actually you do not need to add Office365 Users to set the default value to current user for SharePoint people field. Simply use below formula in the Default property of the dropdown control in people field's data card:

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

And if you want the dropdown still shows the original value when editing an existing item, use below formula instead:

If(Text(EditForm1.Mode)="1",{ 
  DisplayName:User().FullName,
  Claims:"i:0#.f|membership|" & Lower(User().Email), 
  Department:"", 
  Email:User().Email, 
  JobTitle:"", 
  Picture:""
},Parent.Default)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Default value of combo box

@v-monli-msft 

  • The first formula worked.  The second formula is giving an error on Parent.Default
  • I also have another screen without any forms, I just inserted a combo box.  How do I make this combo box default value as the current user?  Neither formulas worked when I tried it.
Highlighted
Anonymous
Not applicable

Re: Default value of combo box

Hi @ ,

 

I have similar issue, but the formula you shared doesn't work for me.

 

I have a Combo Box where I expect only one selection (I set as false the SelectMultiple). For the Items I refer to a Person-Type Column "Host" at my list "VMS invitations". I assume this is not an issue as it works well. But the Default value of the current user I don't get to make it work.

 

I don't know what I am missing.

 

Untitled.png2.png

 
Highlighted
New Member

Re: Default value of combo box

How do I make the combo box's default value to multiple users  ?  For instance, the source is a people picker field (SharePoint Online) with below settings:

Highlighted
Frequent Visitor

Re: Default value of combo box

This did not put the current user in that field.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,466)