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.
The error may be encountered when a Workflow Instance is started:
The Issue may also be encountered when Editing a List Item using a K2 Form:
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:
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.