SharePoint Designer Workflow problem with Lookup column There is a particular scenario in which you might receive the below error if using SharePoint Designer List Workflow.
Coercion Failed: Unable to transform the input lookup data into the requested type.
Workflow Scenario
Consider a SharePoint list called "Employee" with following schema.
Employee Name (Text)
Country (Lookup)
We create a SharePoint Designer workflow to send a simple email with Employee Name and Country when an item is created.
After publishing the workflow, let us see try creating a few items and see the outcome.
Workflow ProblemThough the workflow is pretty simple. We note that it worked fine where lookup values are the United Kingdom, United States, Spain, Australia, but fails when the lookup value is blank. It gets 'Canceled' in this case. If we look closely at the workflow history, it shows these details -
Event Typ - Error
User ID - System Account
Description - Coercion Failed: Unable to transform the input lookup data into the requested type
The description is useful for us - Coercion Failed: Unable to transform the input lookup data into the requested type.
Analysis and TroubleshootingThis happens when you use a Lookup site column in workflow and the value is BLANK/NULL. The workflow fails when transforming the Lookup data (blank in this case) into Lookup Value (as Text). Further steps of the workflow will not be reached and it gets canceled and logs the error.
How to fix - Resolution
The solution to this is converting the Lookup value to a string and then using it in workflow stages.
- Create a Workflow Local Variable named "country" of type "string".
- Modify the workflow by adding an if condition to check if the Lookup value is not-empty (is not empty).
- Set the variable to the Lookup Value
- Add further stages after the if condition. Add an else condition if required.
- Re-test
After modifying the workflow this way, even null/empty/blank lookup values will be converted to a blank string value.
Make sure you do this for every lookup column if you feel the value can be blank anytime.
This is not an AI-generated article but is demonstrated by a human.
Please support independent contributors like Code2care by donating a coffee.
Buy me a coffee!

Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!