How to fix text field containing invalid data Error

I came across this issue when I used “Log to History List” in the workflow. I was trying to log the dictionary variable value returned from HTTP Web Service and got this error message: A text field contains invalid data. Please check the value and try again.”

Details:
In this blog we will discuss the cause and solution of an Invalid text value error. A text field may contain invalid data that comes while working with visual studio workflow in SharePoint Online. A “HttpSend” workflow action is used to call the rest API. By using Get Dynamic Value Properties I am trying to retrieve the values and assign to different variables, as below:

The issue usually occurs when working on data with more than 255 characters. If the data is less than 255 characters, the error usually does not appear.

When developing SharePoint solution, you may have experienced this common issue while inserting or updating items in SharePoint lists programmatically.

This exception occurs when trying to insert text to a column “Description” in the “History List” which is a “Single line of text” type with a value that contains more than 255 characters.

Solution
To solve this issue simply either reduce the size of the log text to below 255 characters or change the attribute of the “Description” column to “Multi line of text”.

You may also like

8 Incident Management Best Practices
Project Management
Laith Adel

8 Incident Management Best Practices

No matter how well you plan your projects, manage your services and organise your teams, your organisation is bound to

Introduction to Incident Management
Project Management
Laith Adel

Introduction to Incident Management

No matter how well you plan and organise your teams, you are bound to encounter some form of unexpected disruption

What is an Issue Log? 
Project Management
Laith Adel

What is an Issue Log?

No matter how well you plan for your projects, there will always come a time when unexpected issues arise that

Get a Free Demo of pmo365