locked
How to assign a particular column values of sharepoint List A 2010 from sharepoint ListB 2010 RRS feed

  • Question

  • Hi

    I have two list in sharepoint 2010. In List A i have Assigned to field column(people or user group). In List B i have two fields Name and Email id column. I need the email id  values of List B should be assigned to (List A assigned field column) when adding new item in the List A.

    How can i achieve this.

    Wednesday, July 25, 2012 3:58 AM

Answers

  • Hi Madhan,

    Thanks for your query.

    You don't have to write a itemHandler for this simple requirement. (Although Hiren is right too, you can use itemHandlers for this), I tend to focus on itemhandlers when there is complex set of requirements and the things sharepoint designer cannot do (itemhandler should be the last resort).

    Yes, you can easily use Sharepoint Designer to publish a workflow that would do all this for you. Open you site using Sharepoint Designer > New > Workflow. Give appropriate name to your workflow and using a simple to use wizard you can publish steps for this operation.

    The workflow covers essential steps like

    • Create Item in List
    • Update field
    • Set item in field
    • Specifiy conditions / branches / if else
    • etc

    Go through this post which will tell you excatly how workflows can be created for a range of business requirements. Don't hesitate to google further on walk throughs and tutorials.

    http://www.codeproject.com/Articles/35404/8-Steps-to-Create-Workflows-using-SharePoint-Desig

    Finally, you can create a simple test site and use that as a template to write and check your workflow with the same lists you mentioned. Once you are happy, simply use the same actions on your live list and publish your workflow.

    Hope this helps,

    Thanks


    Wednesday, July 25, 2012 9:59 AM

All replies

  • i think for that you need to write event handler,

    That event handler will fire while ItemAdding or ItemAdded in list A as per your requirement,

    When you are inserting item in the List A , you need to get this Assigned to value using event handler from ;list 2 and also get the Name and Email ID from the list B and stored both the value in List A for the particular Assigned to value.

    You can follow below link to create the Event handler.

    http://www.expertsupdates.com/sharepoint-articles/create-event-handler-for-sharepoint-list-31.aspx


    Hiren Patel | Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

    Wednesday, July 25, 2012 4:47 AM
  • Thanks for you reply.

    I don't want to use Event receiver project. Is it possible to achieve this using workflow.?

    Wednesday, July 25, 2012 6:15 AM
  • Hi Madhan,

    Thanks for your query.

    You don't have to write a itemHandler for this simple requirement. (Although Hiren is right too, you can use itemHandlers for this), I tend to focus on itemhandlers when there is complex set of requirements and the things sharepoint designer cannot do (itemhandler should be the last resort).

    Yes, you can easily use Sharepoint Designer to publish a workflow that would do all this for you. Open you site using Sharepoint Designer > New > Workflow. Give appropriate name to your workflow and using a simple to use wizard you can publish steps for this operation.

    The workflow covers essential steps like

    • Create Item in List
    • Update field
    • Set item in field
    • Specifiy conditions / branches / if else
    • etc

    Go through this post which will tell you excatly how workflows can be created for a range of business requirements. Don't hesitate to google further on walk throughs and tutorials.

    http://www.codeproject.com/Articles/35404/8-Steps-to-Create-Workflows-using-SharePoint-Desig

    Finally, you can create a simple test site and use that as a template to write and check your workflow with the same lists you mentioned. Once you are happy, simply use the same actions on your live list and publish your workflow.

    Hope this helps,

    Thanks


    Wednesday, July 25, 2012 9:59 AM