none
Define Workflow Lookup RRS feed

  • Question

  • I am creating a basic workflow that sends an email when a new item is created in a list called "Transactions" All lookup information in the message except for one comes from "Current Item". I need to include information from a "Item Number" column from a different list called "Library" on the same site.

    I can't seem to figure out what to include in the "Define Workflow Lookup" dialog box though. I keep getting a message stating that the lookup is not guaranteed to return a single value.

    lookup Details is:
    Source: Library
    Field: Item Number

    Find the List Item
    Field: Library:Item Number

    Do I need to create a variable? if so, what and how?

    Monday, March 21, 2011 5:49 PM

Answers

  • Please note that the message you are receiving is just a warning that pops up anytime you do a lookup that is not on the current item - it doesn't necessarily mean that it is incorrect. 

    For a lookup like this to work you need to have a matching Item number somehow either from the current list item, or from a workflow variable.  How does the Transactions list relate to the Library on your site?

    So, the find the list item would be your Library:Item Number.  But the lookup details would need to be something like Source:  Current Item;  Field:  (MatchingItemNumber)

    • Marked as answer by Peng Lei Friday, April 1, 2011 8:05 AM
    Monday, March 21, 2011 8:41 PM
  • Hi,

    The "AssetId" request variable you are getting in your URL can be used for identifying your item. You can add this Id to your Transaction list item as another column, which will get auto filled from request string. You have to modify your checkout.aspx page in SharePoint designer for doing the same. Then in your workflow you use this column for unique lookup on Asset ID. Hope this helps.

    For modifying your aspx page and get value from query string do some google as there are a lot of examples on net. A nice sample is available on this link:

    http://geekswithblogs.net/SoYouKnow/archive/2009/10/29/setting-sharepoint-form-fields-using-query-string-variables-without-using.aspx

     

    Hope this helps.

    Regards.

    • Marked as answer by Peng Lei Friday, April 1, 2011 8:05 AM
    Tuesday, March 29, 2011 8:04 AM
  • Hi Marcus,

    I finally got the template installed.  Is this a separate workflow you are creating on the Transactions list?  The transaction list already has a workflow called "Setup" that is inititiated when a new item is created.  Within there, there is a workflow variable created called "AssetID".  You could add your email action to this workflow and get the item number by matching the Workflow Data Asset ID variable to the Library:  ID.  See step 1 in the Setup workflow where it updates the Library item.  You'll see at the bottom of that dialog how it matches.

    • Marked as answer by Peng Lei Friday, April 1, 2011 8:05 AM
    Thursday, March 31, 2011 3:17 PM

All replies

  • Please note that the message you are receiving is just a warning that pops up anytime you do a lookup that is not on the current item - it doesn't necessarily mean that it is incorrect. 

    For a lookup like this to work you need to have a matching Item number somehow either from the current list item, or from a workflow variable.  How does the Transactions list relate to the Library on your site?

    So, the find the list item would be your Library:Item Number.  But the lookup details would need to be something like Source:  Current Item;  Field:  (MatchingItemNumber)

    • Marked as answer by Peng Lei Friday, April 1, 2011 8:05 AM
    Monday, March 21, 2011 8:41 PM
  • I am using the “Lending Library” Application Template. The “Library” list has over 100 training videos, each having a specific “Item Number” associated with it. The transaction list is where a user checks out a video from the library and includes the video title, shipping, and contact information. This list has a workflow attached to it that sends the library manager an email describing what item is being checked out and the item number is needed because there are multiple copies of the same video. The only thing that is not a part of the “Current Item” is the “Item Number”. And I can’t figure out how to include it in the email when I add lookup to body. This is my last obstacle for this project, and any help would be greatly appreciated. Here's a link to a screenshot.

    Tuesday, March 22, 2011 1:31 PM
  • Are the titles of the videos the same for the multiple copies?  If they have different (unique) titles you can match it from that. 

    If this is the case, what you can do is in the Find the List Item section for Field select  Library:Title.  Then for value click fx, keep it on current item, and choose "Video Title" from the dropdown.

    (I currently don't have this template installed, so I'm not familiar with it's specific setup)

    Tuesday, March 22, 2011 3:26 PM
  • Yes, the titles are the same for the multiple copies. Any more suggestions for adding the lookup from a different list?
    Tuesday, March 22, 2011 5:56 PM
  • Hmm... Well, let me ask this ---- when a user checks out a video how do you know from the transaction list which video it is specifically?  Or is what you're trying to accomplish really automating checking out a specific Item Number based on the video title?
    Tuesday, March 22, 2011 7:36 PM
  • It's somehow built in to the template. When the "Check Out" link is clicked, the "Transactions" list form is opened and the Title (from the Library List) is auto populated into the field in the transaction list form.

    Library List http://i432.photobucket.com/albums/qq43/smithmedia79/LibraryList.jpg

    Transactions (Check out form) http://i432.photobucket.com/albums/qq43/smithmedia79/Transactions.jpg

    I guess if worst come to worst, I can just add the Item Number to the end of all titles :/. I'm still open to suggestions though. Thanks for all your time.

    Tuesday, March 22, 2011 9:22 PM
  • Hi Marcus, I haven't abandoned you - as you know the MSDN email alerts were just recently turned back on so I'm getting flooded and just marking them all as read and trying to manually revisit posts I'm participating.  I'm going to deploy this template on my sandbox and see how we can tie the item number in...
    Thursday, March 24, 2011 6:17 PM
  • Okay, thank you so much for helping.

    Monday, March 28, 2011 1:39 PM
  • Hi,

      One question. Please check whether your transaction checkout form contains any ID in URL of page. The reason I'm asking to check is because maybe using this ID your Asset field is getting auto populated.

    Please check let us know.

    Thank you

    Monday, March 28, 2011 4:53 PM
  • Yes, there is an ID in the URL. It appears that the ID is causing Asset field to be auto populated. When I change the ID number in the URL, the Asset (Title) changes.

    https://voyager.vitalcareinc.com/ResourceCenter/QAlibrary/Lists/Transactions/CheckOut.aspx?AssetID=15&Source=

    Monday, March 28, 2011 7:47 PM
  • Hi,

    The "AssetId" request variable you are getting in your URL can be used for identifying your item. You can add this Id to your Transaction list item as another column, which will get auto filled from request string. You have to modify your checkout.aspx page in SharePoint designer for doing the same. Then in your workflow you use this column for unique lookup on Asset ID. Hope this helps.

    For modifying your aspx page and get value from query string do some google as there are a lot of examples on net. A nice sample is available on this link:

    http://geekswithblogs.net/SoYouKnow/archive/2009/10/29/setting-sharepoint-form-fields-using-query-string-variables-without-using.aspx

     

    Hope this helps.

    Regards.

    • Marked as answer by Peng Lei Friday, April 1, 2011 8:05 AM
    Tuesday, March 29, 2011 8:04 AM
  • Hi Marcus,

    I finally got the template installed.  Is this a separate workflow you are creating on the Transactions list?  The transaction list already has a workflow called "Setup" that is inititiated when a new item is created.  Within there, there is a workflow variable created called "AssetID".  You could add your email action to this workflow and get the item number by matching the Workflow Data Asset ID variable to the Library:  ID.  See step 1 in the Setup workflow where it updates the Library item.  You'll see at the bottom of that dialog how it matches.

    • Marked as answer by Peng Lei Friday, April 1, 2011 8:05 AM
    Thursday, March 31, 2011 3:17 PM