cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DavJaq
Level 8

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
seadude
Level 10

Re: Populate department of selected person?

Hi @DavJaq.

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
seadude
Level 10

Re: Populate department of selected person?

Hi @DavJaq.

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

DavJaq
Level 8

Re: Populate department of selected person?

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

seadude
Level 10

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~!

Brice235i
Level 8

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.

seadude
Level 10

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,548)