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:
I added Office365Users as data source, and set the DefaultSelectedItems property - gave an error expected table value
Office365Users.UserProfile(User().Email).DisplayName
Solved! Go to Solution.
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
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
Hi @v-monli-msft ,
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.
This did not put the current user in that field.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
203 | |
98 | |
60 | |
56 | |
52 |
User | Count |
---|---|
257 | |
161 | |
87 | |
79 | |
68 |