Constraints
Last updated
Last updated
This section provides options for limiting input values, setting default values, and configuring field validation.
Here you can specify the minimum and maximum values that can be entered into the columns. Any values outside of this range are not permitted. These limits can be applied to the input types: Number, Decimal, Date Time, and Date.
Consider the example below, where the minimum and maximum values are set for the 'Salary' column.
The existing values remain unchanged. However if a user enters a salary that falls outside the specified range, they will be notified of the minimum and maximum limits.
Note: You can also set any one of these limits (either minimum or maximum).
For Date and DateTime input types, users may choose a date range or both date and time range. Any date and time outside of this range will not be accepted.
This option is available for the Text input type, where you can define whether you want to allow only numeric, alphanumeric, or non-numeric input. You can also specify whether the input should be an Email ID or a URL.
The field value is validated against your specified input type configuration. If another type is entered, it is not accepted.
EDITable lets you configure default values for the columns. When a new row is added, the specified column is automatically filled with the default value if you have set one.
To set a default value, click the highlighted option below, beside the required column.
To set a static value, select Manual and enter the value. In the example below, a static value is set as the default date for the 'Start Date' column.
Whenever a new row is added, this column value is automatically populated by default.
Checking the 'Reset to default on update' option sets the default value for newly inserted rows and disables the column from editing. The existing values are retained, and automatically changed to default only when users edit other values in the specific record. Find below an example where the value changes to the default
For the 'Decimal' input type, you can also specify the default number of decimal digits to be allowed.
For the 'Person' input type, you can either use their name or email address as default.
For the 'Single-select' type, you can choose the default value from the list of options you have configured.
For the 'Check Box' type, the default values are automatically configured with the Boolean values: true and false. You can change these to 1/0 or yes/no, etc., if necessary.
You can set derived values as defaults instead of using static values. These derived values are calculated using configurable formulas.
EDITable provides many Excel-like formulas and functions to help you perform these calculations. These values change dynamically as the underlying reference data changes.
Derived values can be set for the field types - Number, Decimal, Text, Date, DateTime, Person, and Email.
Checking the 'Recalculate data on update' option sets the calculated value as default for newly inserted rows and disables the column from editing. The existing values are retained, and automatically changed to the derived value only when users edit other values in the specific record.
We have discussed setting constraints and defaults for table data. In the next section, we will explore how to select and look up values from a table or visual for a single-select field type.