creating a workflow on one list to update list column for an item in another list based on a condition RRS feed

  • Question

  • Hello Friends,

    I have two lists: list1 and list2

    I'm trying to create a workflow on list2, which will run when an item is added or updated. So the workflow should update "status" field in list1 on the corresponding list item whose requestID is equal to the request:ID of the item in list2.

    I have been trying this from a long time, but unable to achieve it.

    My approach:

    1. Create a workflow variable currentItemID

    2. Store the current request:ID from list2 in it

    3. Now compare the currentItemID with the requestID from list1

    4. Do a update action.

    I'm facing problem in step 3, I believe. Its not straight forward. I cannot directly select the requestID from list1. I get to select two fields.

    Can anyone help please.

    Many thanks !

    Tuesday, February 3, 2015 12:46 PM


All replies

  • I will suggest you not use default ID column as we don't have control on that. Once couple of item crated and deleted, ID will be out of sync as they always increment from last created/delete item not last item exists. better to use our own ID column where we have control to change/update etc.

    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

    Tuesday, February 3, 2015 3:48 PM
  • Hi Sudip,

    Thanks for your response.

    That's correct, but we are not worried on the sequence of id numbers here..We are okay with that, as long as the id numbers remain the same for the corresponding requests. We will hide that anyway from end users.

    Can you please let me know, if using these OOTB ID column has any affect on the workflow ?

    Thanks again !

    Kind Regards..

    Tuesday, February 3, 2015 4:12 PM
  • I am not sure what do you mean by effect, you can refer it, read it without any issue. Many time disp/edit form url construct referring ID. If ID dont need to change and WF logic is ok, then using ID is not an issue

    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

    Tuesday, February 3, 2015 4:26 PM
  • Hi Sudip,

    Please see below the screenshot. Instead of ID column, I now tried to compare the unique "request name" column in both the lists.

    I use the condition: "if any value equals value"

    In the above condition, for the first value I select the current item - RequestName (i.e from list 2), I can do so very easily using a workflow variable and I get first screen, but for the second value or for that matter, when I try to navigate to different list then the second screen appears below.

    My only question is in the second screen below, what is the significance of the two fields below, in addition to the first two fields at the top. I select the source list and corresponding column, but again It asks me to select a Field and value in the bottom two fields. (Please refer fig 2). What is this for? Can you clarify?

    Thank you!

    Tuesday, February 3, 2015 5:52 PM
  • that is where clasue

    See link - http://www.documentmanagementworkflowinfo.com/workflow/understanding-define-workflow-lookup-dialog-sharepoint-designer.htm

    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

    • Edited by Sudip Misra Tuesday, February 3, 2015 8:39 PM
    • Marked as answer by John.P.Smith Wednesday, February 4, 2015 7:44 AM
    Tuesday, February 3, 2015 8:38 PM