Default Value
Default value facility empowers developers to specify fallback values for empty or missing columns. This ensures data consistency and completeness while receiving the data.
Till the date, if imported spreadsheet contains missing value or any column is not mapped, the response uses {{key}}
as placeholder. By utilizing Default Value functionality developer has more control over format of response they will receive.
Setting Default Values
Default value can be applied to columns either at the time of adding column or updating column. Wildcard values like null
, undefined
can also be used, which available in the dropdown.
Means developer can choose one of these predefined values or write default value as a string of their choice.
null: Represents the null value.
undefined: Represents an undefined value.
Empty String: Represents an empty string.
Empty Array ([]): Represents an empty array.
Boolean true: Represents the boolean value
true
.Boolean false: Represents the boolean value
false
.
While providing custom schema you can mention with defaultValue
key and put your desired string or appropriate value
from mentioned table.
Label | Value |
---|---|
null |
|
undefined |
|
Empty String |
|
Empty Array ([]) |
|
Boolean true |
|
Boolean false |
|
When default value gets applied?
The provided default value is used when imported data gets sent to application as response. The default value will be applied to column when,
Column Not Required and Not Selected During Mapping:
When a column is not marked as required, and the user chooses not to select the column during the mapping phase, the default value will be used in response.
Column Not Required and Contains Empty Value:
When a column is not marked as required, and the column contains an empty value, the default value will be applied to fill the gap.
Providing default value during Runtime Schema
Web portal GUI makes it easy to assign default value to column. Based on needs you can provide default value while providing schema during runtime too.
Default Value example with Runtime Schema
The Default Value functionality provides flexibility and control to developers when importing data. Whether dealing with optional columns or handling empty values, this feature enhances the overall data import experience.
Last updated