access/iterate calculated column

Hello,

how can I iterate a calculated column?

line 25 columnCursorRecordType = DataValueCursor.CreateFormatted(dataTable.Columns["Record Type"])
line 26 columnCursorItemType = DataValueCursor.CreateFormatted(dataTable.Columns["Item Type"])

Item Type is my calculated column and it gives me this error:

Traceback (most recent call last):
  File "Spotfire.Dxp.Application.ScriptSupport", line unknown, in ExecuteForDebugging
  File "<string>", line 26, in <module>
  File "Spotfire.Dxp.Data", line unknown, in get_CurrentValue
SystemError: Object reference not set to an instance of an object.

 

More detailed:

Object reference not set to an instance of an object.
   at Spotfire.Dxp.Data.Cursors.DataColumnValueCursor`1.get_CurrentValue()
   at _stub_$557##557(Closure , CallSite , Object , CodeContext )
   at Microsoft.Scripting.Actions.MatchCaller.Call2[T0,T1,TRet](Func`4 target, CallSite site, Object[] args)
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at <module>$544##544(Closure , Scope , LanguageContext )
   at Spotfire.Dxp.Application.ScriptSupport.IronPythonScriptEngine.Execute(ScriptDefinition script, Dictionary`2 scope)
   at Spotfire.Dxp.Application.Scripting.ScriptService.Execute(ScriptDefinition script, Dictionary`2 scope, LicenseManager licenseManager, InternalLibraryManager internalLibraryManager, NotificationService notificationService)
   at Spotfire.Dxp.Application.Scripting.ScriptManager.<>c__DisplayClass4.<ExecuteScript>b__3()
   at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(Executor executor, Boolean visible, Boolean sticky, Guid stickyGuid)
   at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(String displayName, Executor executor)
   at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.Transaction(String displayName, Executor executor)
   at Spotfire.Dxp.Application.Scripting.ManagedScript.Execute(Dictionary`2 environment)
   at Spotfire.Dxp.Application.HtmlTextAreaControls.ActionControl.ModifyCore(Object value)
   at Spotfire.Dxp.Application.Visuals.HtmlTextArea.<>c__DisplayClass14.<>c__DisplayClass16.<ModifyControl>b__13()
   at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(Executor executor, Boolean visible, Boolean sticky, Guid stickyGuid)
   at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(String displayName, Executor executor)
   at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.Transaction(String displayName, Executor executor)
   at Spotfire.Dxp.Application.Visuals.HtmlTextArea.InteractWithControl(String id, Action`1 interaction)
 

Thank you for your help

(1) Answer

Login