Feature 91: Configuring default value for a data table column | Backend as a Service Platform

Message:

Subscribe rss
Blog categories
All | Backendless features
Feature 91: Configuring default value for a data table column
April 9, 2015 by markpiller

As data objects are being saved or updated with the API requests some properties of the objects may not have a value assigned to them. It may be necessary that for those properties a default value is assigned. This is identical to how relational databases may have a default value for a column.

Configuring a default value for a column is very easy. You can set it when you declare a column or after a column is already created.

The popup window for creating a new column includes a field where the default value can be set:
default value field - Feature 91: Configuring default value for a data table column

Alternatively, when a column already exists in a table schema, there is a field which displays and lets you edit the default value:
default field existing column - Feature 91: Configuring default value for a data table columnOnce a default value is assigned to a column, it becomes immediately effective. When an object is saved or updated does not have a value for a property corresponding to the column, Backendless inserts the default value.

Share this post
Tweet about this on TwitterShare on FacebookGoogle+