none
SharePoint Designer 2007 Workflow - Update item in another list RRS feed

  • Question

  • I created a List called "Instructor Certification Interest" with the following columns:

    • User Name
    • Tracking List ID (corresponds to the ID field of a second list called Tracking List, and is populated by workflow described below)
    • Group Number
    • Other columns unique to this list, but not relevant to this question

    Next I created a List called "Instructor Cerfication Tracking" with the following columns:

    • User Name
    • Group Number
    • Other columns unique to this list, but not relevant to this question

    I then created a SharePoint Designer 2007 workflow that is triggered upon creation of an item in "instructor Certification Interest".  That workflow has the following conditions and actions:

    Conditions

    • If Tracking List ID is empty
    • and Group Number is greater than 0

    Actions

    • Create Item in "Instructor Certification Tracking" - Add User Name and Group Number from "Instructor Certification Interest" - output to Variable:CreationData
    • Set Tracking List ID to Variable:CreationData

    I want to add a step to the workflow that updates the item in the "Instructor Certification Tracking" any time the corresponding item in "Instructor Certification Interest" is updated.  I tried using the Update Item action, but when set the List value to "Instructor Certfication Tracking", and then update the "Find the List Item" field value to "Instructor Certification Tracking:ID" , I'm unable to choose the Tracking List ID Value from the Current Item.

    Is it possible to update an item in one list based on information in another list?

    If so, how do you define the lookup to correlate the items in the two lists?

    Thanks!


    Chris Mang>> JDA Software Group, Inc.

    Monday, September 23, 2013 9:08 PM

Answers

  • Hi Chris,

    Sorry for that my previously post tests based on SharePoint Designer 2010.

    I test this again on SharePoint Designer 2007, and the workflow variable "CreationData"(e.g. Tracking_listItemID in my test) is "List Item ID" type, and it can be updated to "Tracking list ID" (Single line text type column) in "Instructor Certification Interest", but the "Tracking list ID" value (string type) cannot be compare with ID (list item ID type) in "Instructor Certification Tracking" like your image above.

    In order to filter out the "Instructor Certification Tracking" item based on the "Tracking list ID" column value of current item in  "Instructor Certification Interest", I create another single line text column (e.g. TrackingID in my image below) in "Tracking" list which value is equal to workflow variable "CreationData" value( also equal to each new item ID in "Tracking" list), I can use this TrackingID column instead of "Track" list ID column to compare "Tracking list ID", you can test this.


    Thanks


    Daniel Yang
    TechNet Community Support

    • Marked as answer by JDAChris Thursday, September 26, 2013 6:05 PM
    Thursday, September 26, 2013 12:40 PM
    Moderator

All replies

  • Hi Chris,

    You may can try the following, it could update the Tracking list item whose ID= "Tracking List ID" from "Interest" list current item. 

    If Tracking List ID is empty and Group Number is greater than 0

         Create the item in "Instructor Certification Tracking" (Output Variable:CreationData)

         Update the current item "Track List ID" with Variable:CreationData

    Else

         Update the item (UserName/GroupNumber) in "Instructor Certification Tracking" , need to find item which ID=Tracking List ID from current item. 

    Thanks


    Daniel Yang
    TechNet Community Support

    Tuesday, September 24, 2013 10:55 AM
    Moderator
  • Daniel,

    Thank you for your prompt response!

    I tried to implement your solution and had two issues:

    1. The Else-If Branch requires a condition - If Tracking List ID (from the Instructor Certification Interest List current Item) is not empty.  Otherwise, the workflow will error out when the corresponding Instructor Certification Tracking list doesn't exist
    2. I am unable to select the corresponding Tracking List ID from the Instructor Certification Interest List - it doesn't show in the Field drop-down

    How can I choose the Tracking List ID field?


    Chris Mang>> JDA Software Group, Inc.

    Wednesday, September 25, 2013 5:07 PM
  • Hi Chris,

    Sorry for that my previously post tests based on SharePoint Designer 2010.

    I test this again on SharePoint Designer 2007, and the workflow variable "CreationData"(e.g. Tracking_listItemID in my test) is "List Item ID" type, and it can be updated to "Tracking list ID" (Single line text type column) in "Instructor Certification Interest", but the "Tracking list ID" value (string type) cannot be compare with ID (list item ID type) in "Instructor Certification Tracking" like your image above.

    In order to filter out the "Instructor Certification Tracking" item based on the "Tracking list ID" column value of current item in  "Instructor Certification Interest", I create another single line text column (e.g. TrackingID in my image below) in "Tracking" list which value is equal to workflow variable "CreationData" value( also equal to each new item ID in "Tracking" list), I can use this TrackingID column instead of "Track" list ID column to compare "Tracking list ID", you can test this.


    Thanks


    Daniel Yang
    TechNet Community Support

    • Marked as answer by JDAChris Thursday, September 26, 2013 6:05 PM
    Thursday, September 26, 2013 12:40 PM
    Moderator
  • Thank you Daniel!

    I just realized that the "Update List Item" action updates the item at the point at which it acts in the workflow.  This is unlike most other actions (on external items), that act at the conclusion of the workflow.

    By updating the Tracking List ID column with the variable value, we now have the correlation that was missing previously.


    Chris Mang>> JDA Software Group, Inc.

    Thursday, September 26, 2013 6:12 PM