Coercion Failed: Unable to transform the input lookup data into the requested type.

SharePoint Workflow error:
Coercion Failed: Unable to transform the input lookup data into the requested type.

Using a workflow, I was trying to set the value of a Lookup field. Where I went wrong was, setting the Lookup field to a field other than the ID column of the Lookup List.

What??

Quick example:
Created two lists.
Taco and Taco Topping.

Taco Toppings fields: Title, Meat, Cheese, Salsa

In the Taco list, I added a Lookup field to Taco Topping, also adding Meat, Cheese, and Salsa fields.

Now for the workflow.

On the Taco list, create a new SharePoint Designer workflow.

The workflow will contain the following actions: Set Workflow Variable and Update List Item

First we will create the variable
click inside of Step 1, from the ribbon click on Action, then find Set Workflow Variable.
Once it’s added to the workflow step, click on blue workflow variable text.
I named my variable Taco ID and set the type to Number.

Next click on the blue value text.

Here I’m querying the Taco Topping list for the ID field, and filtering by the Title column of the Title fields of Taco and Taco Topping. Think of this a simple SQL select statement with a where clause. Select ID from Taco Topping where Title = Current Item: Title

Next we will add the Update List Item action.
Click below the Set Variable action, then add the Update List Item from the Action button in the ribbon.
Click on the blue this list text.

Here I’m updating field T to the ID from workflow variable Topping ID.
This is what will drive updating our Taco list to the toppings from Taco Topping.

Your workflow should now look like this.

Publish the workflow, all done!

*Be sure to change your workflow settings (in the ribbon) if you want the workflow to run when a new item is added or changed.*

5 thoughts on “Coercion Failed: Unable to transform the input lookup data into the requested type.

  1. Thank you!!!! I was trying everything to try to get at the value of the lookup and this was exactly the issue!
    thank you thank you thank you!!!!

  2. Hi, this is indeed helpful article. Doing this I’ve faced with another questions:

    1. How include information to email from these fields:

    T: Meeat
    T: Chease
    T: Salsa

    Neither string, nor lookup (as text) doesnt work, email comes empty.

    2. If you will have 2 items with the same Title. In Taco Topping item value will be equal for the item which were created first.

  3. @Azamat

    Using the Topping ID variable, you should be able to query the Toppings list again. This will return the correct values for your email.

Leave a Reply

Your email address will not be published. Required fields are marked *