none
Workflow to update records in all child list items, on change in Parent List item...

    Question

  • I have 2 lists... One parent with unique Title & other child with Lookup column on Title on Parents ... and it's 1 to many relationship... i.e Child List has multiple items for 1 parent Title...

    There is a assigned to (People Picker) field in Parent List, which is also there in all Child items... 

    What I want to achieve is that when we change/update that 'assigned to' column in Parent List, it should update all records (ranging from 2-50) in child list through a workflow or something...

    Any answers on how to make this happen would be greatly appreciated....

    Tuesday, September 04, 2012 5:19 PM

Answers

  • Hi Ashish,

    You can bind a workflow to Parent list. If the Assigned To is changed (Also need a Assigned To copy field), modify the Assigned To in child list. Like this:

    If Current Item:Assigned To != Current Item: Assigned To copy,
    Update child list: Assigned To (which Assigned To = Current Item: Assigned To)
    Update current item: Assigned To copy = Assigned To.

    And also need a workflow and Assigned To Copy field for child list.

    If Current Item:Assigned To != Current Item: Assigned To copy,
    Set Workflow variable:temp=Current Item:Assigned To,
    Update Current Item: Assigned To Copy = Current Item: Assigned To
    Update child list: Assigned To which Assigned To = Workflow variable:temp.

    Note: If it is not unique data in Assigned To field, we can't use Assigned To as the lookup field, otherwise, it will also update the other item which has the same user in Assigned To.

    And please see my post to create a looping workflow. But in this thread, it is used to deleted all related list items but not update. You can do some changes to it.
    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010customization/thread/a83e86aa-4b42-4921-8275-18bb884e1395

    I would like suggest you to use event reciever as a convenient solution.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support


    Friday, September 07, 2012 6:20 AM

All replies

  • Hi Ashish,

    Do you want to display the Assigned To field related to the Title field been selected in child list?

    If yes, here is a workaround for you.

      • Create a text field (named it Assigned To copy) in parent list.
      • Create a list workflow for parent list, set to start automatically both when new item is created and item is changed. And only one action is needed:
        Set Assigned To Copy = Assigned To (We can also use Update list item action)
      • Select the Assigned To copy field as additional lookup field when you add the Title field as a lookup field in child list.
      • Done and then you can see the related Assigned To field in child list from Assigned To copy field.

    Let me know if you have any question.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support


    Wednesday, September 05, 2012 9:49 AM
  • Thanks for the Reply Emir... but I think that would work for 1:1 Relationship, i.e this will update only 1 Child Item "Assigned To" field not all... 

    I have upto 25 Child items for a Parent item, so looking for a way to update all.

    Wednesday, September 05, 2012 2:38 PM
  • Hi Ashish,

    Yes, my solution is works for your requirement.

    We add Assigned To copy  is added as a additional field in child list. And additional field will change follow the selected value in the lookup field automatically and also will get/display the data from its resource list field with need to change it manually.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    Thursday, September 06, 2012 5:26 AM
  • I believe this solution would work if I have a "Assigned to" as additional look up column in Child List... but it's a People Picker field because we are using that column to define permissions, so it has to be people picker.

    Please let me know, if I understood it incorrectly, and this solution would work for people picker "Assigned To" in Child List.

    Thanks

    Ashish

    Thursday, September 06, 2012 3:11 PM
  • Hi Ashish,

    You can bind a workflow to Parent list. If the Assigned To is changed (Also need a Assigned To copy field), modify the Assigned To in child list. Like this:

    If Current Item:Assigned To != Current Item: Assigned To copy,
    Update child list: Assigned To (which Assigned To = Current Item: Assigned To)
    Update current item: Assigned To copy = Assigned To.

    And also need a workflow and Assigned To Copy field for child list.

    If Current Item:Assigned To != Current Item: Assigned To copy,
    Set Workflow variable:temp=Current Item:Assigned To,
    Update Current Item: Assigned To Copy = Current Item: Assigned To
    Update child list: Assigned To which Assigned To = Workflow variable:temp.

    Note: If it is not unique data in Assigned To field, we can't use Assigned To as the lookup field, otherwise, it will also update the other item which has the same user in Assigned To.

    And please see my post to create a looping workflow. But in this thread, it is used to deleted all related list items but not update. You can do some changes to it.
    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010customization/thread/a83e86aa-4b42-4921-8275-18bb884e1395

    I would like suggest you to use event reciever as a convenient solution.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support


    Friday, September 07, 2012 6:20 AM
  • Hi Emir,

    Thanks so much for this post!  I tired your solution and it works perfectly for the first 9 items in my list.  When the workflow gets to the 10th item it stops.  There isn't an error but I can see the the workflows were not triggered on the 10th item.  Have you seen this issue previously?

    Kind regards,

    Adine

    Tuesday, July 30, 2013 5:47 PM