icon | description |
---|---|
eye-slash |
Do you need to import data in columns that are not fixed firsthand? Impler provides a facility to provide schema at the moment of opening the import widget. |
{% hint style="info" %}
Available after the impler version 0.9.1
{% endhint %}
Consider you have an ERP application that needs to import sales information. Our system provides a way to add extra information to sales information, like challan-no
. Other users might have different columns.
In that case, fixing the import data structure is impossible. So we need to pass schema during run time when the user clicks on Import
button to import the data.
You can find relevant implementation for react in #providing-runtime-schemaand for HTML & HS in #providing-runtime-schema
[
{
name: 'Name',
key: 'name',
type: 'String'
},
{
name: 'Phone',
key: 'phone',
type: 'Number',
defaultValue: '#########'
},
{
name: 'Country',
key: 'country',
type: 'String'
}
]
Here are the keys
name (required)
: The name of the column, will be displayed in the import widget during mapping.key (required)
: The key of the column, will be used to create an Excel file and match it with available headings in the file.type (optional)
: One of the types fromString
,Number
,Date
,Email
,Regex
,Select
, andAny
to override the existing type for the column.isRequired (optional)
: A boolean value indicating whether values in the current column are required.isUnique (optional)
: A boolean value indicating whether values in the current column must be unique.selectValues (optional)
: Select values indicating what are the possible values when the type is select.regex (optional)
: A regular expression to override when the type isregex
.dateFormats (optional)
: Date formats indicating a list of formats acceptable for the date field. Required when type isDate
. For example,['dd/mm/yyyy','dd/mm/yy']
{% include "../.gitbook/includes/your-feedback-is-crucial-in....md" %}