cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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!

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!

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.

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

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 182 members 4,841 guests
Please welcome our newest community members: