cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
emfuentes27
Advocate III
Advocate III

Set selected value on dropdown depending on Current User

I have a PowerApps form that has a dropdown with a lists of names. I need to select the name that matches, or at least is closest to the current user.

I tried by setting a variable Set(c_User, User().FullName), and then Default = c_User, and also tried directly by setting the Default = User().FullName. The names on the dropdown list should be identical the result of User().FullName. I get an "Expected Record Value" error message, and this below.

 

ppp.jpg

 

I wonder if there are some differences between the DD value and the result from User().FullName. Maybe just space here and there something. Any suggestion would be appreciated.

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @emfuentes27 ,

Setting the Variable at the start is not a bad idea as User().FullName is not Delegable, however you cannot have "the closest" - it must match exactly one of the items able to be selected in the drop-down, otherwise it will not display. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Is  there a way to do like a "contains"? The issue is that I'm moving all my forms from the old SharePoint Designer environment where I have all my stuff working just perfectly using HTML/JavaScript/CSS to PowerApps, and I need this to work some how. I was able to make it work just fine using JavaScript.

 

Thanks.

Hi @emfuentes27 ,

You did not tell me exactly how you were querying this, but the In and Search filters are not Delegable, so if you have more than 2,000 records, you cannot filter this way.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

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

Top Solution Authors
Top Kudoed Authors
Users online (3,375)