3 Replies Latest reply on Jun 5, 2018 1:16 PM by Jonathan.Schmidt

    Managers Picklist

    blwallace Specialist

      Running 2017.3.

      I'm looking to create a pick list of just managers, but unclear how to do this.  I'm importing employees from AD and filling in the manager (manager link) field.  Is there a way to create a pick list of just names that appear in this field, and only show that name once?  [A manager may appear many times over the employee population.]

        • 1. Re: Managers Picklist
          Jonathan.Schmidt SupportEmployee



          You won't be able to create a picklist constraint based solely on the fact that record appears on at least one other record in the Manager Link field.  The logic is set up to constrain by fields on the records themselves or relationships FROM the records, not the existence of a relationship TO the records.  You might need a custom field on the Employee object like "HasSubordinates" that you populate the boolean to TRUE when appropriate.  Then you could build a picklist that looks at Employee and constrains by this field being marked true.


          I hope this helps.


          1 of 1 people found this helpful
          • 2. Re: Managers Picklist
            blwallace Specialist

            So that makes sense.  I can run a powershell script(s) to get a list of user names

            1. Get-ADUser -Filter "DirectReports -like '*'" | select Name
            2. Get-ADUser -LDAPFilter "(&(directReports=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))" | select Name

            or an LDAPSearch command

            1. ldapsearch -x -h <hostname> -p 389 -D <username> -W -b <tree location> -s one "(&(directReports=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))" displayName

            to get the same list.


            Is there a way to import a list like this into a pick list?

            • 3. Re: Managers Picklist
              Jonathan.Schmidt SupportEmployee

              You could create a custom validation object and then use a CSV data import to populate the data.  You could even have your server run the appropriate powershell and output a csv file once daily and use the shared folder data import so it'd automatically pick up changes...  Be aware though this is an IMPORT only.  If someone is removed from this list you'd need to find a way to clear them out.


              The alternative is the get really crazy with some kind of webAPI integration, but that's well outside my world of understanding.