1

I have a custom list with the following columns to track employee absences and coachings. This list is used by managers. Managers will enter details for an employee coaching session.

  • Employee Name: Person or Group
  • Discussion Type: Choice
  • Discussion Date: Date and Time
  • Discussion Comments: multiple lines of text

What I'm trying to do is create a list view that will only display items where the employee name is someone who reports to the manager viewing the list? Basically, if the Employee Name field contains a person that reports to me, display that item, if not, don't display that item. I've tried a variety of methods but all have come up short. I can't do where created by = [Me], we move employees around a lot. I want to see entries for an employee that reports to me but maybe I've not entered an entry for that person yet.

I've scoured the internet and have had no luck. Any help you can provide would be greatly appreciated.

  • What if you add manager's name to the list and create a view. – Sunil Sahu Dec 23 '17 at 7:18
  • The problem is the manager will change over time so I would like the view to change as well. – Mike Williams Dec 24 '17 at 1:08
0

With SharePoint's built-in list view functionalities this isn't possible, unless you provide some additional information along the fields you already have.

Because any further personal information besides the person's name can't be retrieved automatically to your list view setting's available fields, there isn't a field which would allow you to do something like [Foreman] equals to [Me]. I'd imagine that a typical approach would be to have a list for your employees and another list which lists e.g. the "teams", "foremen", "supervisors", or whichever suits to your case. These information would need to be kept up-to-date manually. Then you could have the information retrieved to your primary list through lookup columns and create the views according to available details. So basically the manual approach we'd usually want to avoid.

To achieve your initial, more automatized goal, it probably could be done with some SharePoint's user REST API calls which query the user properties from the AD details. This would require an up-to-date AD profile and significantly more work in terms of customization. How to do this exactly would be a whole another question.

0

There is no OOB way to achieve your requirement.

As a workaround, you can create a column named “Manager”, which displays manager of Employee Name user via JSLink. Then filter items by Manager = [Me].

JSLink files have the ability to quickly and easily change how a list views and forms are rendered. More specifically how the fields in that list should be displayed: https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.