1

I am trying to implement a system that when users upload a document, each item is automatically updated with the "created by" user department name. I want to filter documents by department. A static dropdown list is not robust enough.

Our users are busy and on the road, so most likely they will just pick the first department on the list. I also want to implement email to list feature. Thanks!

1

It depends on the extend of the work you plan to do (in either cases you would need to make sure you do have additional columns, e.g. to store the Department, available on the target library) - explanation:

  1. No-code solution - I'm thinking on building a Workflow that could use the Created-By (Author - internal field name) property and lookup in User Profile the actual Department property (could even be Managed Metadata - which would give you a great Search experience as the Refinement panel will be automatically populated)!
  2. Code-based - is easier - build an event handler to achieve the same effect in the ItemAdded and update properties of the document already in the Library by that time. For the remaining, same applies as in case #1 - with regards to Managed Metadata and search
| improve this answer | |
  • Only problem if is a user changes departments. That is another event you would need to handle :) – Robert Lindgren Feb 22 '14 at 12:13
  • 1
    Agree Robert - but at least we've got events & methods to get latest changes in User Profiles. I'm also thinking a search-based update routine for the user having changed the Department could do the trick. – Marius Constantinescu - MVP Feb 22 '14 at 12:33
  • Thanks everyone! Changing department is not an issue. The document should always be part of that department anyway - not follow the user. I've tried workflow but in SP2013 I cannot seem to lookup user department. I was able to do it in SP2007 but not SP2013. The event handler might be a better solution, but I will need the assistance of my IT department as that's beyond my scope. – Ryan George Feb 24 '14 at 20:43
  • Ryan, in SharePoint 2013 you also have client-side API which could mean that using a CEWP (also enriched in 2013 to easy link a JS to it) could allow extracting User Profile data. Have you already considered this? – Marius Constantinescu - MVP Feb 26 '14 at 17:44

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.