none
SharePoint 2010 Designer Workflows and SharePoint Lookup Column Issue

    Question

  • Hi,

    I currently have two separate list that are attached in my SharePoint Site through a SharePoint Designer workflow that fires when an item is created (through an infopath form). Here is what it looks like:

    List 1 = Colors   List 2 = Colors 2

    Columns within Colors:                                          Column with Colors (2nd List):

    Blue                                                                        Blue (workflow with Blue)

    Red                                                                        Red (workflow with Red)

    Yellow                                                                    Yellow (workflow with Yellow)

    Green                                                                    Green (lookup of Green)

    The Blue, Red, Yellow columns are all entered at the beginning through an InfoPath Form, and the Green is not. The Green column gets its data entered midway through the project which is why it is set up as a lookup column.

    My issue is that the specified lookup column of green does not run at all anymore, and I believe it is because of the workflow. Before the workflow was put into place the lookup column worked fine, and it currently works fine for historic projects, just not new ones since the workflow was established. Is there a quick fix to this issue? I do not want to make another workflow based off of the Green Column because my data will get duplicated in a negative manner.

    Any help would be greatly appreciated.

    Thanks,

    -Greg


    Greg Baker

    Tuesday, September 11, 2012 3:42 PM

Answers

  • Hi Greg,

    Yes, that is the problem.

    When we don't give a date to a date column, it will store the date like this: 1/1/0001 12:00:00 AM. You can try to update a blank date field to another text field to check it from workflow.

    So the next step is:

    1. Workflow should be set to start when item changed and new item is created:
    2
    . Create a workflow variable: date.
    3. Modify workflow actions like this:

    Set workflow variable: date = current item: Go Live Date,
    If workflow variable: date not equals to 1/1/0001 12:00:00 AM
    Create new item

    Let me know if there is any question.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    • Marked as answer by GBaker88 Friday, January 18, 2013 7:06 PM
    Wednesday, September 19, 2012 11:11 AM

All replies

  • Hi Greg,

    Could you tell us how you design your workflow and what do you want to do with the workflow?

    There some differences to use lookup field and command field in workflow.

      • When we use lookup field as condition, we need to set like this:
        If Current Item: lookup field equals ID;#value (eg: If Current Item: lookup field equals 1;#Blue)
      • When we assign value to lookup field, please give ID field like this:
        Set lookup field = 1, then it will return as Blue if ID of Blue item in list 1 is 1.

    Let me know if I misunderstand you.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    Wednesday, September 12, 2012 11:00 AM
  • Hi Emir,

    My workflow is designed based off of an InfoPath form. Once it is submitted the information is pushed to two separate SharePoint list. The workflow is currently set up to only fire when an item is created, and my lookup columns won't have data inputed into them until midway through the project. 

    The unfortunate aspect of the lookup columns (since they are not part of the workflow) is that they do not work on new items that are submitted, but the work on old ones.

    Example:

    Two items one blue and one red. They each of a lookup column named test. 

    Test in the blue item was already in the list before the workflow and the lookup column (test) works for blue. However, since red was created after the workflow was initiated the lookup column (test) does not work.

    Hope that helps.

    Thanks,

    -Greg


    Greg Baker

    Monday, September 17, 2012 4:14 PM
  • Hi Greg,

    Thanks for your reply.

    How about add a delay workflow action: Wait for Green field to be not empty, and then do remains workflow actions?

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    Tuesday, September 18, 2012 10:27 AM
  • Hi Emir,

    Thanks for the help. The problem with trying to delay the workflow is that the "Green" field may not be entered for some time and the rest of the information needs to be updated right away.

    The "Green" field is actually a date field and I am wondering if that is why I am having this issue?

    We can go ahead and just call "Green" "Go Live Date". Right now I have a separate workflow for the "Go Live Date".

    The two separate lists (List A and List B) both contain a "Go Live Date" column

    In this workflow I was attempting to say if Current Item: (List A:Go Live Date) is not empty then Create a new list item in LIST B (Go Live Date). However the "is not empty" option does not populate. Is this because this is a date field? Is there a work around this?

    Sorry for the confusion and thanks for your help,

    Greg


    Greg Baker

    Tuesday, September 18, 2012 3:34 PM
  • Hi Greg,

    Yes, that is the problem.

    When we don't give a date to a date column, it will store the date like this: 1/1/0001 12:00:00 AM. You can try to update a blank date field to another text field to check it from workflow.

    So the next step is:

    1. Workflow should be set to start when item changed and new item is created:
    2
    . Create a workflow variable: date.
    3. Modify workflow actions like this:

    Set workflow variable: date = current item: Go Live Date,
    If workflow variable: date not equals to 1/1/0001 12:00:00 AM
    Create new item

    Let me know if there is any question.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    • Marked as answer by GBaker88 Friday, January 18, 2013 7:06 PM
    Wednesday, September 19, 2012 11:11 AM
  • Hi Emir,

    Thank you for your help!

    Is there anyway to set up the workflow so that the date changes but a new item is not created? I am now able to pull the date over but it is creating multiple rows within my list. Is there anyway to just update the one specific row rather than creating more?

    Thanks again,

    Greg


    Greg Baker

    Wednesday, September 19, 2012 8:59 PM
  • Hi Greg,

    If you want to update current list item, you can use both "Set a field in current item" action and "Update list items" action.

    If you want to update a list item in other list, you can use "Update list items" with lookups.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    Thursday, September 20, 2012 10:37 AM
  • Hi Emir,

    For some reason I am struggling with the "Update List Items" option. If I have two separate Lists (A, B) and am trying to update list B with the information from List A, how should it look? Here is what I have so far:

    If Current Item(list A):Active Go Live is greater than 9/9/2000

    Update Items in B:

    Within the popup window I have B selected as the list

    Active Go Live (B) as the field and Current Item: Active Go Live (A) as the Value

    Then below that is the Field List Item option, which is where I think I am making my mistake, set as the following:

    Field: Active Go Live (B)

    Value: Current Item: Active Go Live (A).

    Thanks,

    Greg


    Greg Baker

    Thursday, September 20, 2012 2:29 PM
  • Hi Greg,

    You want to use update a list item in list B, but seems that you have problem to define the lookups.

    Update Active Go Live field in list B with the value in Current Item: Active Go Live.

    Then define the lookups.

    Suppose lookup column in list B is named Lookup. And it is lookup test field from list A. The your lookup should be:

    Lookup = Current Item: test.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    Friday, September 21, 2012 2:53 AM
  • Hi Emir,

    I am still struggling with this and, am thinking a new route will have to be taken.  I appreciate your help.

    Thanks,

    Greg


    Greg Baker

    Friday, September 21, 2012 1:37 PM