none
Display related user department from person or group column RRS feed

  • Question

  • User Need: I have a SharePoint list of report requests. The list has a column for requester(s). It's a person or group column with multiple selections enabled. I want to display a column with the the departments associated with the requester from the Active Directory lookup. 


    What is the best way to do this? 

    Wednesday, February 20, 2013 9:04 PM

Answers

  • We can first sync the AD users to SharePoint User Profile services.

    Then create another user or group column with multiple selections enabled. When create the user or group column, we can see the “Show field” option, select “Department”.

    Next step, we can create a SharePoint Designer workflow used to copy the users from the first user column to the new created user column with “Set Field in Current Item” or “Update list items” action and don’t forget to select “Display Names, Semicolon Delimited” for “Return field as” when retrieve data from the first user column (refer to below image).

    Thanks & Regards,
    Emir


    Emir Liu
    TechNet Community Support


    • Edited by Emir Liu Thursday, February 21, 2013 9:05 AM
    • Marked as answer by Emir Liu Thursday, February 28, 2013 2:05 AM
    Thursday, February 21, 2013 9:04 AM

All replies

  • Hi Rob,

    for this to work you need to combine a couple of solutions.

    First you need to setup the UPS, here is my articles on this matter.
    http://everythingsharepoint2010.blogspot.co.at/2012/05/user-profile-synchronizationad-and-my.html

    And special note to the following article as "Replicating Directory Changes" if not configured will cause your Sync to fail.
    http://sensoft2000-sharepoint.blogspot.co.at/2010/08/error-replication-access-was-denied.html

    When this is setup and configured all your details will be in the UPS and these properties will be available when using "/_vti_bin/UserProfileService.asmx"
    http://msdn.microsoft.com/en-us/library/aa981571(v=office.12).aspx

    This service can be used in InfoPath to auto populate the fields of the user when user X is selected.

    How to use this web service.
    http://mackenzie-sharepoint.blogspot.co.at/2011/11/infopath-2010-userprofileserviceasmx.html

    How to do what you are asking for.
    http://claytoncobb.wordpress.com/2009/06/21/userprofileservice-extended/

    This is a lot of leg work to accomplish. I have suggested above the InfoPath route, but you can also use ldap queries in aspx code, this I have no experience in as I always choose the code free solution.

    Regards
    Pieter
    Thursday, February 21, 2013 9:00 AM
  • We can first sync the AD users to SharePoint User Profile services.

    Then create another user or group column with multiple selections enabled. When create the user or group column, we can see the “Show field” option, select “Department”.

    Next step, we can create a SharePoint Designer workflow used to copy the users from the first user column to the new created user column with “Set Field in Current Item” or “Update list items” action and don’t forget to select “Display Names, Semicolon Delimited” for “Return field as” when retrieve data from the first user column (refer to below image).

    Thanks & Regards,
    Emir


    Emir Liu
    TechNet Community Support


    • Edited by Emir Liu Thursday, February 21, 2013 9:05 AM
    • Marked as answer by Emir Liu Thursday, February 28, 2013 2:05 AM
    Thursday, February 21, 2013 9:04 AM