Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Set dropdown default value to a value from users list

Can someone help me please?


I have a entity on which I store knowledge levels of our users. Therefore I created a lookup from the users table in my knowledge level entity, called mdw_id.

Now I am creating a PowerApp in which the users can add knowledge by themselves. I got it all working if they must select their own user id out of the created dropdown list. However I don't want them to select their own user id, I want this stored (on the background) by default to the current logged in user. The User() is working, because I have it somewhere on that same page. But it is not working for that mdw_id field.


On the "newLanguage" form I have now 3 fields. The mdw_id which is a lookup field in Users, the language which is a lookup field in the Language entity and a knowledge level. As said it is working like this. But I want the mdw_id filled by default.

If I select the user via the dropdown, it is shown and stored as "Lastname, Firstname".


I set up the DataCardValue of the DataCard mdw_id like:


If( NewLanguage.Mode = FormMode.New;
{ Value : User().fullname };
Parent.Default )


In the formula editor box I see User().fullname = Firstname Lastname. And if I run the app it is also shown the value FirstName Lastname. However it is giving also an error saying that value should be an entity item.


If I change the { Value : User().fullname } to { Value : "Lastname, Firstname" } it is showing the same error.


I have tried to set the { Value : First(Filter(Users; domainname = User().Email)) } but that is not giving any result. I guess it has to do with the First statement is giving a full User entity. I guess it must know which field out of this entity should be taken.


Can someone provide me with the correct solution?



Accepted Solutions

I managed it differently!


I have now the defaultSelectedItems: First(Filter(Users; domainname = varUser.Email))


Thanks for your help!

View solution in original post

Community Support
Community Support

Hi GilbertS:

Do you want to automatically fill in the record of the current user that in the user entity into the dropdown control?

Could you tell me whether you use combo box control or drop down control?


Case1: combo box(I recommend this solution )

You can achieve it through setting the DefaultSelectedItems property of the combo box control.

Set the drop down controls DefaultSelectedItems property to:


LookUp(Choices('knowledge levels'. mdw_id),User().FullName in 'Full Name') 


/*Since user () function can only call full name, for convenience, I used "Full name" directly. In addition Full Name is a field that already exists in users entity, so you can use it directly*/




Case2: drop down

Set the dropdown control’s default property to:


LookUp(Choices('knowledge levels'.crec3_mdw_id),User().FullName in ' Full Name’).'Full Name'  





Best Regards,


Hi v-bofeng-msft,


I used indeed a combo-box. I have set the DefaultSelectedItems to what you stated. However that was not giving any result. But I read somewhere that using Email address is more stable. Therefore I changed the User().Fullname to User().Email.


If I look at the formula screen I can see the correct record is selected. However on the screen it is not selected and it is not stored in the CommonDataService.




On the screen I see no selected item:

PowerAppComboboxLeeg.JPG PowerAppComboboxLijst.JPG

In the table it is storing without Mdw_id:


Please @v-bofeng-msft suggest what to fix. Thanks!

HI @GilbertS :

I suggest you try this code:

LookUp(Choices(tbltalen.cr438_Mdw_id),User().Email in 'Primair e-mailadres') 

with out using "[@XX]"

Best Regards,


That doesn't help. It is worse. Now the formula has an error. It is saying: "Function choices has illegal arguments." "The name is not valid. This id is not recognized.



The first formula was correct I guess. But somehow it is not selecting.

Hi @GilbertS :

May be misspelled.I see the drop-down box has popped up the data source name.Try to choose the option that pops up in the drop-down box.

Best Regards,


I managed it differently!


I have now the defaultSelectedItems: First(Filter(Users; domainname = varUser.Email))


Thanks for your help!

View solution in original post

Helpful resources

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,913)