Workflow email with lookup fields

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
jorge.ramos
Posts: 5
Joined: Tue Apr 26, 2016

03 Jun 2016

I have two subsites; Asset Management and HR. The HR site has a list called Employees, which contains the name of every employee. The Asset Management site has a list called Tracking, which is used to track equipment, this list has a lookup column to the Employee list in the HR site to lookup employee names. I created a workflow with SharePoint Designer 2013 to send me an email every time a new item is created in the Tracking list. When I try to add the value of the column that has the employee name, the workflows fails to complete due to an error that says “the lookup is in another web”.

How can I display the value of the lookup field in the email body?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

04 Jun 2016

Hi,

Unfortunately, SharePoint does not support cross-site lookup columns in workflows.

As a workaround, you can to get value from the lookup field with the help of our workflow action 'Get Items by Query'. You can specify a simple query like this:

Code: Select all

<View>
    <Query>
        <Where> 
            <Eq>
                <FieldRef Name="ID" />
                <Value Type="Counter">ID of the current item</Value>
            </Eq>         
        </Where>
    </Query> 
    <ViewFields>       
        <FieldRef Name="The internal name of the lookup field"/>       
    </ViewFields>
</View>
Replace the highlighted text with corresponding values.

Then you can get the value with 'Get an Item from Dictionary' action by using the path: (0)/FieldValues/The internal Name of the lookup field.

Next, you can use the lookup ID to request the user field.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests