cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: How can I get JobTitle of any user using Office365Users?

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.

Proud to be a Super User!

Regards,
KrishnaV
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
Highlighted
Super User III
Super User III

Re: How can I get JobTitle of any user using Office365Users?

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.

Proud to be a Super User!

Regards,
KrishnaV
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.
Highlighted
Resolver I
Resolver I

Re: How can I get JobTitle of any user using Office365Users?

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

Highlighted
Resolver I
Resolver I

Re: How can I get JobTitle of any user using Office365Users?

@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

 

Highlighted
Super User III
Super User III

Re: How can I get JobTitle of any user using Office365Users?

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.

Proud to be a Super User!

Regards,
KrishnaV
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.
Highlighted
Resolver I
Resolver I

Re: How can I get JobTitle of any user using Office365Users?

@KrishnaV 

 

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

 

Thanks,

Pei

 

 

 

Highlighted
Super User III
Super User III

Re: How can I get JobTitle of any user using Office365Users?

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.

Proud to be a Super User!

Regards,
KrishnaV
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.
Highlighted
Resolver I
Resolver I

Re: How can I get JobTitle of any user using Office365Users?

@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

 

Highlighted
Super User III
Super User III

Re: How can I get JobTitle of any user using Office365Users?

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.

Proud to be a Super User!

Regards,
KrishnaV
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

Highlighted
Resolver I
Resolver I

Re: How can I get JobTitle of any user using Office365Users?

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

 

Pei

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (3,416)