|Using Lookups in Workflow Studio|
Field Lookups (formerly “External Lookups”) are similar to Current Item Field lookups, but they allow designers to specify fields from other items, not just the one the workflow was started on. The other item could be in another list on the same site, in other lists in a different site, or even in a list on a site in another site collection.
To configure a Field Lookup, click to open the Add Lookup – Webpage Dialog and then perform these simple steps:
First, select the Site Collection, a Site in that site collection, and a List in that site where the item you want to lookup resides.
|2.||Next, select a field in that list to return (the Lookup Field). If the lookup field you select is a SharePoint Person or Group column, you can also choose how to display the user information when the lookup is expanded.
See Notes below.
Finally, specify the item in the list to use, since the workflow does not know about it like it knows the “current” item. Select a Filter Field in the list that you want to use as a matching (or “key”) field, and specify the value that the filter field must have in order for the item to be a match. You can either type something explicitly in the Equals field, or you can insert a lookup to some other value, such as a matching property in the current item.
As an example, this screenshot shows a Conditional Branch Widget configured only to perform an action if the current item is newer than an item with the same Name in a list called Published Documents. A Field Lookup retrieves the Created date field from a list where the Name of the list item matches the Name of the current item.
You can use a lookup in place of an actual Site Collection, Site, List, or Field name by selecting the –Other [Site Collection/Site/List/Field]– option. Once you use a lookup for one Field Lookup form field, all other form fields subordinate to that will require a lookup or explicitly-entered value. Since lookup values are not known until the workflow runs, Workflow Conductor will fill in the actual values then.
As another example, this shows a Field Lookup configured to retrieve the Created by column value from a list and list item that are created during the workflow. Since the list name and the list item ID are both workflow variables and not known until the workflow runs, lookups or specific values are used to populate these values.
When specifying criteria for a Field Lookup that is a SharePoint Person or Group column configured to allow multiple values, the SharePoint column values must be listed in the exact order specified in the lookup criteria. For example: If the criteria is a Person or Group column matching User1; User2, SharePoint column values entered as User2; User1 will not match.
When specifying criteria for a Field Lookup that is a SharePoint Choice column configured to allow multiple values, you cannot select the values like you can for single Choice columns. You must enter them as text or a lookup to text in the format Value1, Value2 (the space after the comma is required). The values must be entered in the same order they appear in the SharePoint column.