Skip to main content
Nintex Community Menu Bar

exclude computed column in smart object in create and update method

  • September 8, 2015
  • 2 replies
  • 32 views

Forum|alt.badge.img+9


 

Symptoms

 


When executing SmartObjects that were constructed off of SQL Tables containing computed columns the SmartObject would throw the following error

The column [COLUMN NAME] cannot be modified because it is either a computed column or is the result of a UNION operator.


•Type: SourceCode.SmartObjects.Client.SmartObjectException

•Source: SourceCode.SmartObjects.Client

•Method Base
◦Member Type: Method

◦Name: ExecuteScalar

◦Module
◾Scope Name: SourceCode.SmartObjects.Client.dll

◦Declaring Type
◾Full Name: SourceCode.SmartObjects.Client.SmartObjectClientServer

•Stack Trace:
at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteScalar(SmartObject smartObject, DataTable inputTable)

at SourceCode.Forms.AppFramework.FormRuntime.SmartObjectExecution(XPathNavigator nav, Boolean outputDependencies, SmartObjectClientServer svr)

at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(String xml)

at SourceCode.Forms.Runtime.AJAXCall.ProcessRequest(HttpContext context)

 

 

Diagnoses

 


N/A

 

Resolution

This is expected behavior as the SQL Server Service Instance, from which the SQL SMOs are generated was not designed to accommodate computed columns.

The simplest way to get around this issue is to create a simple Stored Procedure to handle row creation.
 

 

 



 

2 replies

Forum|alt.badge.img+10
  • August 15, 2016

The simplest way to get around this issue is to create a simple Stored Procedure to handle creating the row.


Forum|alt.badge.img+2
  • November 23, 2016

Another option that works well is to not assign a SmartObject property to the input field when creating the SmartObject in Visual Studio or K2 Studio.