none
Creating folder automatically based on sharepoint list item entry RRS feed

  • Question

  • Hi,

    I am working with SharePoint2010.

    Context: I have an Employee list in Sharepoint 2010 containing the columns- Employee ID, First Name, Last Name, Email, Phone No. I am keeping all employee records (Files and other information) in the Document Library. Each employee is containing one separate folder to keep documents. I need to do the whole process automatically.

    Question: Is it possible to create a folder in the document library automatically when an employee record is inserted into the Employee list. The folder name slhould be the combination of Employee ID, First Name and Last Name. The list should keep a link with the newly created folder where user can click and directly access the folder for a particular employee.

    Thanks
    pointtoshare

     

    Wednesday, March 2, 2011 3:17 AM

Answers

  • Hi all,

    My problem is solved for this time. I have just passed the url within a html tag. Its working well now.

    Will bother you again with a new problem in the future.

    Thank you very much for your all cooperations.

    • Marked as answer by Lily Wu Monday, March 7, 2011 6:00 AM
    Sunday, March 6, 2011 10:11 AM

All replies

  • You could use event receivers to achieve the desired functionality. Whenever an item gets added to your employee list you could use the "ItemAdded" event handler method to add a new folder to the document library and then have a "Hyperlink" field in your employee list updated to store the path to the respective folder.

    More on Event Receivers:

    http://msdn.microsoft.com/en-us/library/ms437502.aspx

    http://farhanfaiz.wordpress.com/2007/12/31/creating-adding-an-event-handler/ 


    My SharePoint Blog
    http://dhireny.blogspot.com
    Wednesday, March 2, 2011 6:16 AM
  • Thanks a lot for your cooperation.

    The fact is that, I don't want to use visual studio. Is it possible to do this by anything else?

    Please guide me.

    Thanks.

    Wednesday, March 2, 2011 7:23 AM
  • Hi, 

     

    I think the only way to do this is by event receiver as Dhiren pointed above. :)

     

    Regards,

     

    Wednesday, March 2, 2011 7:41 AM
  • Hi,

    I solved first two parts except the last part. i.e. getting the link of the newly created folder into list column.

    Context: I am giving the idea of current situation. I have a list containing 4 columns. Columns are containing the mentioned values-

    1. EmpId > 1001
    2. First Name > John
    3. Last Name > Elton
    4. Folder Name > 1001JohnElto (Autogenerated folder name the combination of ID, First and Last Name) 

    The folder is generating automatically in a document library with the Value of "Folder Name" column when an item is inserted into the list and it is done by Nintex Workflow.

    Requirement: I want to do at the same time that the URL of the newly created folder will be inserted into the "Folder Name" column. The link should be behind the Name; i.e. in "Folder Name" column "1001JohnElton" will reamin same but it will contain the URL of the folder. User will click the "1001JohnElton" and access directly the folder.

    Pelase guide me.

    Thnaks.

    Thursday, March 3, 2011 4:18 AM
  • You could use a SPD workflow that checks if the folder already exists.

    If not, create a new list item, content type folder, and move your document under the new folder.

    Thursday, March 3, 2011 8:37 AM
  • Hi, I guess you have created the folder and only thing left is link to the folder , rite?

    If so, you can use a simple SPD workflow to fill the url field. Since you know the name of the folder ( Id + First name + last name) you have those values in the list.

    Thursday, March 3, 2011 9:49 AM
  • Hi _AB,

    You are right. I can create the folder. Now I need to pick the link of newly created folder and set it behind the related "Folder Name" column value. User will see a link named "1001JohnElton" in the "Folder Name" column and just click the link to access that folder.

    I have SP Designer2010 in my PC. But I am not used to SP Designer Workflow. So, I am not getting the appropriate direction to do this.

    Guide me if it is possible.

    Thanks.

    Thursday, March 3, 2011 10:17 AM
  • If you are naming your folder like "1001JohnElton", then for every folder to be created, you know the name of folder before hand.

    So trigger a workflow on item added event which takes the fields "Emp Id " + " first name" + "last name" and place it in the URL field of the list or library.

    (for suppose you are creating folders in some library names Details, then your link will be somewhat like http://servername:port/Details/1001JohnElton/)

    Open your site in SPD, click on workflows, create new, associate your list or library, On item added event add the action to place the url.

    follow this link for reference

    http://office.microsoft.com/en-us/sharepoint-designer-help/workflow-conditions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376962.aspx

    Regards

    AB

    Friday, March 4, 2011 5:39 AM
  • Hi,

    Thanks for your replay.

    I can now generate the link of newly created folder. But I can not set the link behind the "Folder Name" value.

    Context: I am now generating the url and keeping it into a new column named "Folder Link". The folder link is different for each entry. So, I need to set the link behind "Folder Name" values dynamically.
    I can set the link from "Folder Link" value as it is containing the url or can set the url directly behind the "Folder Name" value form workflow variable. But the "Folder Name" value should be the name of the folder as a link of related folder.

    Question: Is it possible to do?   how?

    Thanks.

    Sunday, March 6, 2011 6:38 AM
  • Hi all,

    My problem is solved for this time. I have just passed the url within a html tag. Its working well now.

    Will bother you again with a new problem in the future.

    Thank you very much for your all cooperations.

    • Marked as answer by Lily Wu Monday, March 7, 2011 6:00 AM
    Sunday, March 6, 2011 10:11 AM
  • Hi @pointtoshare

    I know it's been a while but can you explain what exactly you did to successfully achieve this. I am trying to do something similar.

    Many thanks for your time.

    Thursday, September 5, 2019 1:56 PM