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

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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,473)