DataConstant - cannot be saved

In ORIGAM realease 2024.11 I have DataConstant exposed to users in Menu. In model it’s DataType is Memo.

In SQL database I see it is stored in a field OrigamParameters.StringValue, which is of Type nvarchar(2000).

I presume it would be better to retype the field to nvarchar(max) so it can store for example some long XML data.

When I cross the limit I get an error message

And server logfile says this

2024-11-12 21:14:40,491 [31] ERROR Origam.Server.Controller.AbstractController - Cannot set column 'StringValue'. The value violates the MaxLength limit of this column.
System.ArgumentException: Cannot set column 'StringValue'. The value violates the MaxLength limit of this column.
   at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)
   at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean suppressEnsurePropertyChanged, Int32 position, Boolean fireEvent, Exception& deferredException)
   at System.Data.DataRow.EndEdit()
   at Origam.Workbench.Services.OrigamParametersData.OrigamParametersRow.set_StringValue(String value)
   at Origam.Workbench.Services.ParameterService.SetCustomParameterValue(Guid id, Object value, Guid guidValue, Int32 intValue, String stringValue, Boolean boolValue, Decimal floatValue, Decimal currencyValue, Object dateValue, Boolean useIdentity, Nullable`1 overridenProfileId)
   at Origam.Workbench.Services.ParameterService.SetCustomParameterValue(Guid id, Object value, Guid guidValue, Int32 intValue, String stringValue, Boolean boolValue, Decimal floatValue, Decimal currencyValue, Object dateValue, Boolean useIdentity)
   at Origam.Workbench.Services.ParameterService.SetCustomParameterValue(Guid id, Object value, Guid guidValue, Int32 intValue, String stringValue, Boolean boolValue, Decimal floatValue, Decimal currencyValue, Object dateValue)
   at Origam.Server.ParameterSessionStore.SaveParameterData()
   at Origam.Server.ParameterSessionStore.ExecuteActionInternal(String actionId)
   at Origam.Server.SessionStore.ExecuteAction(String actionId)
   at Origam.Server.ServerCoreUIService.SaveData(Guid sessionFormIdentifier)
   at Origam.Server.Controller.UIServiceController.<>c__DisplayClass15_0.<SaveData>b__0()
   at Origam.Server.Controller.AbstractController.RunWithErrorHandlerAsync(Func`1 func)

The model is going to be adjusted.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.