Skip to main content

I believe the default behaviour of the GUI when adding a new item through a form is to retrieve all fields and filling them with the default value (if defined). Even if the field is hidden. All fields are eventually  specified in the actual insert / update statement (excluding identity columns it seems).

I am using a column with the default value set to expression and newsequentialid(). This can only be used as a default expression for the column. So i want to exclude this column when adding a new item.

I have unchecked the default, layout, context checkmarks for this field in the subjects. When i add a new item through a form i get the following error:

I think what's happening is that field is still retrieved and initiated with it's default value newsequentialid(). Is there anyway to exclude this field?

 

I found this topic on the community Uniqueidentifier with NEWSEQUENTIALID as Primary Key | Thinkwise Community (thinkwisesoftware.com) from which i derive that newsequentialid() is not supported.

Hi Ling Wu,

Whilst the Default expression can be deployed on the database, the GUI does not work with it.

What you can try is the ROWGUID data type, this will in turn also enforce a newsequentialid() on the database and is (I believe) supported. You can check that as I lack the experience with this.


Thanks, this does the job! When using the ROWGUID datatype the GUI automatically replaces it with a null value, whilst default expression on the database is set to newsequentialid().