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.

Highlighted
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
secondImage

New Return to Workplace

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

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,567)