cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ppei
Resolver I
Resolver I

How can I get JobTitle of any user using Office365Users?

I wonder how I can get job title of any user using Office365User connector. I know we can use MyProfile (Office365Users.MyProfile().JobTitle) to get logged in user's Job Title, but I cannot figured out how I can automatically load the other user's job title. I have a People picker column that should be able to be used to get the user's Job Title.

Thanks in advance,

Pei

1 ACCEPTED SOLUTION

Accepted Solutions
KrishnaV
Super User III
Super User III

Hi @ppei ,

 

Please try this:

First(Office365Users.SearchUser({searchTerm:DataCardValue11.Selected.Email}).JobTitle).JobTitle

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

9 REPLIES 9
KrishnaV
Super User III
Super User III

Hi @ppei ,

 

try this:

UpdateContext({varUserTitle:LookUp(Office365Users.SearchUserV2().value, Mail = UserEmail.Text).JobTitle})

Now set this value to a label.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Krishna,

 

     Thank you for your quick reply. Sorry I have two questions.

 

  1. How can I add the People Picker’s column in your formula?  The people picker’s field currently only show people’s display name, not email. The column name in Power Apps is Employee_DataCard.
  2. Where should I put your formula for the label? I actually want to added to a TextInput field (Job Title).

 

Thanks,

Pei

@KrishnaV 

 

Below is what I tried to accomplish - auto fill Job Title field when I enter an employee name. I don't know where I should add your formula. Can you help?

ppei_0-1594161488604.png

Thanks,

Pei

 

KrishnaV
Super User III
Super User III

Hi @ppei ,

 

Sorry for the late reply, I was completely arrested with my work today!

Ok coming to your question where is Job Title in the form? All I see is Employee Name and Position! so do you want to show in any other field? if so use the formula I have provided in that field directly.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV 

 

Job Title is the Employee Position field. I want to auto fill the field after I pick a Employee Name.

 

Thanks,

Pei

 

 

 

KrishnaV
Super User III
Super User III

Hi @ppei ,

 

Set the below formula on Default property of the employee Position text filed:

LookUp(Office365Users.SearchUserV2().value, Mail = EmployeeName.Email).JobTitle

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV 

 

Thank you for your help. Unfortunately, it is still not working. I got the error below. Any ideas?

ppei_0-1594225608250.png

 

Thanks,

Pei

 

KrishnaV
Super User III
Super User III

Hi @ppei ,

 

Please try this:

First(Office365Users.SearchUser({searchTerm:DataCardValue11.Selected.Email}).JobTitle).JobTitle

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

@KrishnaV Worked perfectly! I really appreciate your help. Thank you!

 

Pei

 

 

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (51,413)