none
Workflow to update items in another list RRS feed

  • Question

  • Hello,

    I hope someone can help me with this,   I think I'm close but just missing something obvious.

    I have 2 lists,  List A  and List B (all up)

    I currently have it so that when an item in List A is created,  a workflow copies that row to List B (all up).

    But what I want to do next is when an item is updated in List A,  that it updates the same row in List B.
    When the item is first created in A,  and updates to B.  I created a variable that is the 'ID-TeamName' from list A that is stored in a column in List B.

    So my thought was,  when an edit happens in List A,  it can use that same variable and look for that in the column in list B.  Then update the row of the one that matches.

    But I cannot seem to get this to work.

    My workflow is as follows:

    Update item in List B (Upper part of I have all the fields I want to update,  with the values from List A).  Lower part of popup I have

    Field:  Column that holds the ID value from List A
    Value "variable with the: ID-TeamName

    But when the workflow fires it says "Item does not exist. It may have been deleted by another user. "

    I also have it log the variable to the workflow history,  and it's recording the correct variable,  so not sure why it can't find it. 

    Thanks!


    Monday, December 21, 2015 4:59 PM

Answers

  • Hi,

    According to your description, you want to update the list item in another list in SharePoint 2013.

    Where do you create the variable “ID-TeamName”?

    If you want to update the items in the list B when the value of ID column in the list A is equal to the value of ID column in the list B, after adding the update list item action in the workflow,

    1. In the update list item dialog, select list B in the list section.

    2. In the field section, select the ID column in the list B.  It displays the columns from list B.

    3. In the value section, select the ID column in the current item in other words select the ID column in the list A.

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, December 22, 2015 9:23 AM
    Moderator
  • As Sara has mentioned, please follow her steps to compare the ID fields in both the list.

    Also just to make sure I am hoping you have a column in listB with the ID of list A. If you are storing the ID value of list A in a workflow variable you will loose that information when the workflow ends.

    What I mean is

    - lets say you add Item1 in list A which also creates Item1 in list B

    - If you store the ID of Item1 in list A to a variable it will be lost and when you try to update the Item 1 in list B you will not have a value to compare to.

    So when you create the items in list B when an item is added in list A store the ID value of the item1 in list B column NOT in workflow variable. Then you can compare both using the above steps of Sara.

    Hope it makes sense.




    Tuesday, December 22, 2015 2:30 PM
  • I was able to figure it out,  I was not setting my variable in the right spot in the workflow.

    Once I moved it,  everything started working.

    Thanks!
    Chris

    Tuesday, December 22, 2015 5:33 PM

All replies

  • anyone have any ideas?

    It seems like it should be working from what I've been reading.

    Tuesday, December 22, 2015 2:29 AM
  • Hi,

    According to your description, you want to update the list item in another list in SharePoint 2013.

    Where do you create the variable “ID-TeamName”?

    If you want to update the items in the list B when the value of ID column in the list A is equal to the value of ID column in the list B, after adding the update list item action in the workflow,

    1. In the update list item dialog, select list B in the list section.

    2. In the field section, select the ID column in the list B.  It displays the columns from list B.

    3. In the value section, select the ID column in the current item in other words select the ID column in the list A.

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, December 22, 2015 9:23 AM
    Moderator
  • As Sara has mentioned, please follow her steps to compare the ID fields in both the list.

    Also just to make sure I am hoping you have a column in listB with the ID of list A. If you are storing the ID value of list A in a workflow variable you will loose that information when the workflow ends.

    What I mean is

    - lets say you add Item1 in list A which also creates Item1 in list B

    - If you store the ID of Item1 in list A to a variable it will be lost and when you try to update the Item 1 in list B you will not have a value to compare to.

    So when you create the items in list B when an item is added in list A store the ID value of the item1 in list B column NOT in workflow variable. Then you can compare both using the above steps of Sara.

    Hope it makes sense.




    Tuesday, December 22, 2015 2:30 PM
  • I was able to figure it out,  I was not setting my variable in the right spot in the workflow.

    Once I moved it,  everything started working.

    Thanks!
    Chris

    Tuesday, December 22, 2015 5:33 PM
  • Hi Chris,

    If the issue is resolved, you could make the reply as answer if the reply is helpful to you.

    Thanks for your understanding.

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    Wednesday, December 23, 2015 12:36 AM
    Moderator