cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Populate department of selected person?

I have a customized SharePoint form with two fields, one for selecting a person (people picker field) and another field (text field) for that person's department. I would like the department field to auto populate with the person's department when the person is selected.

 

Tried with 

Office365Users.UserProfile(DataCardValue75.Text).Department

 (DataCardValue75 is the person selection field)

 

but it does not work... am I close or way off?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Populate department of selected person?

Hi @Anonymous.

Try:

  • Ensure your Person-type field is a ComboBox in PowerApps
  • Ensure the Department field is a Text Box in PowerApps
  • Set Department Text Box Default Property to DataCardValue75.Selected.Department.

Good luck!

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Populate department of selected person?

Hi @Anonymous.

Try:

  • Ensure your Person-type field is a ComboBox in PowerApps
  • Ensure the Department field is a Text Box in PowerApps
  • Set Department Text Box Default Property to DataCardValue75.Selected.Department.

Good luck!

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Populate department of selected person?

Thanks @seadude that worked...simpler than I thought, Happy New Year!

Highlighted
Super User
Super User

Re: Populate department of selected person?

No sweat! Also note the other Active Directory objects you have access to after the "." (Department, JobTitle, etc.)

2019 cometh~!

Highlighted
Skilled Sharer
Skilled Sharer

Re: Populate department of selected person?

Hi seadude, don't supposed you know how to get the person's manager?  the person nominated is not necessarily the current user.

Super User
Super User

Re: Populate department of selected person?

Hi. Off the top of my head, it’s OfficeO365.ManagerV2({searchterm:User().DisplayName}) or something like that.
If you search the forum for “Get manager” you’ll find the exact syntax.
Good luck!

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,392)