locked
Accessing "Created By.Department" list data RRS feed

  • Question

  • I want to create a column in a document library that contains the "Department" associated with the name in the "Created By" column. Can someone help me do this?
    Wednesday, May 30, 2012 8:13 PM

Answers

  • Hi,

    In SharePoint 2007 there isn't a an OOTB way to achieve your requirement.

    to get this done please refer - http://datacogs.com/datablogs/archive/2007/08/26/641.aspx which will help you to create a cascaded column and you will have the department automatically assigned based on created by column.

    these are some more references

    http://debugmode.net/2010/02/05/cascading-drop-down-column-in-a-sharepoint-2007-list/

    http://sharepointsircar.blogspot.com/2009/02/cascading-dropdownlist-custom-field.html

    hope this helps


    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/ | Posting is provided "AS IS" with no warranties, and confers no rights

    Wednesday, May 30, 2012 11:50 PM
  • Theoretically speaking, I don't think you even need to create a separate column. You can create a data view web part for that library using SharePoint Designer. Then add an additional column in the view, where for each row a query will be performed in SharePoint's user profile webservice. The query will be done based on the information obtained from the "Created By" column. This way, in your view you'll always have the department info that's already in SharePoint feeded through Active Directory.

    I can't give you exact instructions but if you're familiar with sharepoint's web services and dataview web part, this should point you to the right direction. It could involve a fair amount of work though.

    Why do you need it though? Can the viewers not click on the link of the "Created By" column to access profile of that user if necessary? That'll show them a lot of information pertaining to that user who created the document. There are a lot of things that can be done using SharePoint, but not out of the box. I usually try to evaluate the benefit vs cost. 

    Hope that helps...


    Pman
    http://www.pmansLab.com/

    Thursday, May 31, 2012 2:26 AM

All replies

  • Hi,

    In SharePoint 2007 there isn't a an OOTB way to achieve your requirement.

    to get this done please refer - http://datacogs.com/datablogs/archive/2007/08/26/641.aspx which will help you to create a cascaded column and you will have the department automatically assigned based on created by column.

    these are some more references

    http://debugmode.net/2010/02/05/cascading-drop-down-column-in-a-sharepoint-2007-list/

    http://sharepointsircar.blogspot.com/2009/02/cascading-dropdownlist-custom-field.html

    hope this helps


    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/ | Posting is provided "AS IS" with no warranties, and confers no rights

    Wednesday, May 30, 2012 11:50 PM
  • Theoretically speaking, I don't think you even need to create a separate column. You can create a data view web part for that library using SharePoint Designer. Then add an additional column in the view, where for each row a query will be performed in SharePoint's user profile webservice. The query will be done based on the information obtained from the "Created By" column. This way, in your view you'll always have the department info that's already in SharePoint feeded through Active Directory.

    I can't give you exact instructions but if you're familiar with sharepoint's web services and dataview web part, this should point you to the right direction. It could involve a fair amount of work though.

    Why do you need it though? Can the viewers not click on the link of the "Created By" column to access profile of that user if necessary? That'll show them a lot of information pertaining to that user who created the document. There are a lot of things that can be done using SharePoint, but not out of the box. I usually try to evaluate the benefit vs cost. 

    Hope that helps...


    Pman
    http://www.pmansLab.com/

    Thursday, May 31, 2012 2:26 AM