NotNull constraint
If you declare the NotNull="true"
attribute on a Column
element, no new row can be inserted into the reference table with no value in the specific
column field.
Form submissions and incoming integration messages may trigger workflow scripts to run on
the server that insert new rows into a reference table, or update existing ones using the
reftable.Insert(), the reftable.InsertOrUpdate(), or the reftable.Update() workflow
script methods. All of these methods throw a Field X doesn't have a default
valueruntime error if you attempt
to insert a new row without a value in a NotNull="true"
field, or to update
the existing value to NULL in a NotNull="true"
field.
When using the Backoffice site to populate reference tables with input data spreadsheets on the Input data tab, the interface will display a Some rows invalid message if the spreadsheet you are uploading has one or more rows with no value in a null constraint column. The offending row or rows will be listed and skipped during upload.
When using the MEBT to
publish
a workflow solution, and the input data spreadsheet that is part
of the solution deployment package has one or more rows with no value in a null constraint
column, the package will be published, but the spreadsheet will not be uploaded to the
Cloud. The offending field or fields will be listed along with a Some rows
invalid error message.
Primary key constraint
If you declare the PrimaryKey="true"
attribute on one or more
Column
elements in a reference table schema, the values in the column or
the columns as a group must be unique within the parent reference table. The
NotNull="true"
attribute must also be declared on each
PrimaryKey
column.
Not declaring the PrimaryKey="true"
attribute on any of the reference
table columns is equivalent to declaring the attribute for every column, which effectively
means that the reference table will not accept duplicate rows.
When a workflow script inserts or updates a reference table row using the reftable.Insert()
, the
reftable.InsertOrUpdate()
, or the reftable.Update()
methods, a Unique constraint violationruntime error is thrown if
the value in an inserted or updated PrimaryKey
field or the values in the
PrimaryKey
fields as a group matches another PrimaryKey
field.
When using the Backoffice site to populate reference tables with input data spreadsheets on
the Input data tab, the interface will display a Some rows
invalid message if there are duplicate values in a PrimaryKey
column or columns as a group. The offending row or rows will be listed and skipped during
upload.
When using the MEBT to
publish
a workflow solution, and the input data spreadsheet that is part
of the solution deployment package has duplicate values in a PrimaryKey
column or columns as a group, the package will be published, but the spreadsheet will not be
uploaded to the Cloud. The offending fields will be listed along with a Some rows
invalid error message.