Default value in mandatory numeric field

I’m not sure is this is a bug or a feature.

In the data builder, if I have mandatory numeric column where I specify a minimum and maximum value, for example 1 and 10, I get an error when I save it if I don’t provide a default value. This is not the behaviour I would like.

I would like to put in a constraint for anyone updating the table that values for that column must be between 1-10. If they don’t supply the value I want the update to be rejected with an error. A default value in this case would be misleading and harmful.

Is it not possible to have a mandatory numeric field with a non-zero minimum and no default value?

Hello Daniel!

You can use the “Mandatory” option. In this case, you don’t need to provide a default value.

If you don’t provide anything you will get an error:

Please let me know if you have any questions.

Lada Kokotova | Technical Support Engineer

If I select Mandatory, and the minimum is non-zero, I do have to provide a default. This is the problem. I want a mandatory field without a default. This is so that a user of the API will get an error if they don’t supply an intentional value for the field.

I’ll figure out why it doesn’t work that way and let you know.

As a temporary solution:

  1. Create a mandatory field
  2. Update minimum and maximum values in this field

Lada Kokotova | Technical Support Engineer