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.
- Move Copy Migrate SharePoint OneDrive files folders to different site collection location
- How to generate client id and secret to register SharePoint App with OAuth
- How to share SharePoint site or document with all users in organization
- Get-ADUser PowerShell - Get AD user details using email address
- error CAML Query containing special characters
- Access URL for SharePoint Tenant Admin Center (Online Office 365)
- Fix SharePoint Error - The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started
- SharePoint - The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
- How to delete SharePoint List Item programmatically using C#.Net
- How to Share Microsoft SharePoint Site with Users or Groups
- JSON column formatting to preview SharePoint Online file on mouse hover
- SharePoint List redirect user after submitting form NewForm.aspx
- See actual SharePoint error exception modify web.config
- SharePoint Server 2016 IT Preview Deprecated Removed features
- How to create SharePoint Document Library
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- How to disable SharePoint subsite creation option for owners
- PowerShell - How to use Try Catch Finally blocks for error exception handling (Windows/SharePoint)
- SharePoint error - Your organization doesn't allow sharing with users from this domain. Please contact your IT department for help. (OSE403)
- [Solved] SharePoint Search Internal server error exception
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- Changed AD user display name showing old name in SharePoint
- How to hide or remove quick launch left navigation from SharePoint Online Modern site page
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- [Solved] Mic not working on iPhone 7 after iOS 14 upgrade - Apple
- Notepad++ Hex Editor - NotepadPlusPlus
- SharePoint Designer 2010 - errors were found when compiling the workflow - SharePoint
- Install Native Java JDK JRE on Apple Silicon M1 Mac - MacOS
- Java JDBC with Join Queries Example - Java
- [fix] AWS S3 make_bucket failed: An error occurred (InvalidBucketName) when calling the CreateBucket operation. - S3
- Delete a Directory using Mac Terminal Command - MacOS
- Microsoft Teams Zoom In and Zoom Out Keyboard Shortcut - Teams