locked
Access data from from two lists based on lookup columns and insert into another RRS feed

  • Question

  • Hi,

    I am new in SharePoint and is stuck in some problem.

    I want to insert data in to a list by fetching data from 2 lists.
    The scenario is :
    List A Columns : EmployeeName, EmployeeID, EmployeeSalary 
    List B Columns : DepartmentName, EmployeeID, ManagerID

    EmployeeID is lookup column 

    I want to fetch data from these 2 lists and insert data into another list:
    List C Columns: EmployeeName, EmployeeSalary, DepartmentName 

    Can someone please explain me all the possible approaches to do the above task
    Saturday, October 18, 2014 3:48 PM

Answers

  • If ListA and ListB are the lists that you created, it would be better to generate the lists data into one list not seperate lists, as they both represents the property information of one employee.

    If they are existing lists, you may have following considerations:

    1. if you are a programmer, it would be easier to have a lookup column at ListA, to generate the EmployeeName, EmplyeeSalary, then using ItemAdded event, to generate the DepartmentName column based on EmployeeID column.

    2. have a lookup column look at ListA, use workflow, set when item is created, start the workflow automatically, then in the workflow, find ListB related item based on EmployeeID column, to set the DepartmentName column, SharePoint designer workflow set Item Value activity can do this work, you can research to find more information about how to do this.

    Thanks,


    Qiao Wei <br/> My blog:http://blog.goobol.com

    • Marked as answer by Dennis Guo Monday, October 27, 2014 1:32 AM
    Sunday, October 19, 2014 3:48 AM