Skip to main content


 

Symptoms


Field Required message for Autonumber
 

Diagnoses


I have a smartobject for a SQL table.
The primary key is a field called ID and this is an autonumber, allow nulls is turned off.

I have tried building the smartobject in a number of different ways with the same result...Whenever I use a Create rule "Execute a smartobject method" on a smartform, the ID field is not configurable. But when the rule is run from a smartform I receive the error message "The following field is required for Create: ID".

This field should not be required, I've built dozens of other smartobjects, with autonumbers and they work as expected. What is going wrong?

 

Resolution

Changing the table schema from:

ID primary key, allow Null = no
Field2, allow null = no
Field3, allow null = no
Field4, allow null = yes
Field5, allow null = no


To:
ID primary key, allow Null = no.
Field2, allow null = yes
Field3, allow null = yes
Field4, allow null = yes
Field5, allow null = yes

refresh the service instance and republished the SMO.
 




 

Make sure the "IS Identity" property of the ID field is set to yes in SQL Man Studio. If it isn't you will get that error no matter the other fields in the schema are set to.


Reply