cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pperrot1
Helper I
Helper I

Setting Dropdown input field Default Value to Logged User Name

Hello,
I have a couple of dropdown inputs that serve as inputs to a gallery based on a Sharepoint list (Projects List). Once selected, the ˜project details˜ Edit Form opens for editing on a side gallery.

The project list has a ˜Responsible Person˜ column filled with a user assigned to each project.

 

One of my filtering dropdowns is based on that ˜Responsible Person˜ column. The Items formula to the dropdown is: Sort(Distinct(Projects List,'Responsible Person'.DisplayName),Result,Ascending)

 

I want that dropdown input to default to the logged User's name on start (so that the user can go straight to his assigned projects), but I also want them to be able to select other team members' names and be able to edit their projects in case they are on vacation, etc. How do I set that default value? Also.. .DisplayName doesn't seem to be a function that the Dropdown input understands.
Please help!

2 ACCEPTED SOLUTIONS

Accepted Solutions
EricLott
Super User
Super User

In the dropdown box's Default property, you can use this formula, assuming the display name in your source is their O365 username.

Office365Users.MyProfileV2().mailNickname

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up. 

View solution in original post

Yes, it worked!
I just had to tweak the formula to:

 

Office365Users.MyProfileV2().displayName

 

Thank you very much!!!

View solution in original post

2 REPLIES 2
EricLott
Super User
Super User

In the dropdown box's Default property, you can use this formula, assuming the display name in your source is their O365 username.

Office365Users.MyProfileV2().mailNickname

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up. 

View solution in original post

Yes, it worked!
I just had to tweak the formula to:

 

Office365Users.MyProfileV2().displayName

 

Thank you very much!!!

View solution in original post

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 (3,195)