This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

After generating K2 Artifacts on a SharePoint List that contains a Calculated Column, an "Input string was not in a correct format" error might be encountered when the List SmartObject is executed.

Symptoms

The error may be encountered when a Workflow Instance is started:

Image

The Issue may also be encountered when Editing a List Item using a K2 Form:

Image

Resolution

The issue is caused when a Calculated Column is configured with a value that does not match the Data Type.

Notice the Formula is configured to return Text, but the Data Type is configured as a Number:

Image 

In the above example, the List SmartObject is generated with a Property of type Number, based on the Data Type defined on the Calculated Column. When the SmartObject is executed via a Workflow or a Form, a Text value is returned from SharePoint that does not match the Number Property in the SmartObject, resulting in the error.

To resolve the issue, ensure the Formula in a Calculated Column returns a value that matches the Data Type.