This tool allows you to create and manage datastores, which are used to store supplementary data for your implementation of Kinetic Request.
The Datastore Console in the Admin Kapp allows you to create datastores (which are forms of type Datastore) which can be used to store supplementary data used in other parts of your applications. The data in the datastores can be accessed via bridges and be used for dynamic lists inside Kinetic forms.
Datastore Home Page
The home page of the Datastore Console lists all the existing datastores. The Create Datastore button allows you to create new datastores. Clicking the configure button allows you to manage the datastore. Clicking the name of the datastore takes you to a page listing all the records inside the datastore.
Creating a New Datastore
In order to create a new Datastore, you must click the Create Datastore button. Here, you must fill in a Name (and Slug which will be auto populated but can be changed), and you may enter an optional description. You may also select a Bridge if you would like a Bridge Model and Mapping for your datastore to be automatically created. The bridge you select must be a Kinetic Core Bridge type for the datastore bridges to work properly.
After you fill in the necessary details and press save, you will be take to the datastore configuration page where you can manage the datastore. You can also go to the configuration page of a datastore by clicking the configure button of a datastore on the home page.
Managing a Datastore
The datastore configuration page allows you to manage several aspects of the datastore, such as changing the Name, Slug, or Description. The button takes you to a page listing all existing records in this datastore.
The button opens the form builder in a new tab/window which is where you define the fields you want your datastore to have. A new datastore (shown to the right) will start with a page with 2 example fields (Status and Sample Field) which you are welcome to change or remove, as well as a section of Action Buttons (Save button and Cancel button). You should not remove the Action Buttons section. Datastores only support 1 page forms; therefore, you should not add any extra pages to the form.
Whenever you make changes to the datastore form in the builder, you will need to refresh the datastore configuration page in order for the changes to appear. You can do so by refreshing the browser or clicking the refresh button at the top of the page.
Display Table Options
The Display Table Options section shows all of the fields that exist in your datastore. The rows of the table are sortable via drag and drop, and the order in which you arrange the rows is the order in which the columns will appear on the records page. Each row also has 4 options which you can specify for each field.
- Visible: Determines whether the field will appear in the records table.
- Searchable: Determines whether the records table's search/filter feature will search this field. A non visible field can still be searchable.
- Sortable: Determines whether you will be able to sort the column of the records table corresponding to this field. The field must be visible in order to be sortable.
- Unique: Determines whether duplicate values can exist in this field when adding records. If multiple fields are marked as unique, the record is only considered a duplicate if another record matching all the unique fields already exists.
Bridge Name & Bridge Qualifications
If you did not select a Bridge Name when creating the datastore, you will be able to select it at any time in the future on the configuration page. After you've selected a Bridge Name and saved the configuration page, a Bridge Model and Bridge Mapping will be automatically created. The model and mapping will both have the same name, which will be "Datastore - <NAME_OF_DATASTORE>" (in the above example, the name is "Datastore - Supplemental Data"). This bridge will define an attribute for every field in the datastore and will map each attribute to its corresponding field value. It will also define a "Submission ID" attribute which will be mapped to the Submission ID of the record.
Once the Bridge Name has been saved, you will also see the Bridge Qualifications section. This section will allow you to define qualifications and their parameters. Here, you are limited to selecting fields as parameters only. When you add a parameter, you can also add a static value for that parameter (Example: For an All Active qualification, you would want the Status field to be a parameter and its value to be set to "active" so that you do not need to specify the value when using the bridge in a form). Once you hit save, the qualifications will be created with the necessary parameters and the qualification query will automatically be built.
If you need more advanced bridges for your datastore, you will need to build them yourself. You should use a different model and mapping name, because if you change the ones created above, your changes will be overwritten when you next save the datastore configuration page.
On the datastore records page, you will be able to view all existing records, as well as add, clone, and delete records. The search box will let you filter the records based on the rows that were defined as searchable on the configuration page. The Add Record button will allow you to define the data for a new record.
The table will list all records and will show the columns/fields defined on the configuration page. The edit button will allow you to edit the record. The clone button will allow you to create a new record, but will pre-populate the values with those of the record you chose to clone. The delete button will remove the record.
CSV Import & Export
You also have the ability to export the records to a CSV file and import records from a CSV file.
The Export CSV button will automatically download a CSV file with all the records in the table. The CSV file will have a column for each field (including the fields that are not visible in the table), as well as an additional Datastore Record ID field, which will contain the database id of the record.
Click the Import CSV button to import records (this requires a modern browser). The CSV file you import must have columns with headings corresponding to the field names. You do not need a column for every field name if you do not need it, but you can not have any extra columns that do not correspond to fields. You may also have a Datastore Record ID column in your CSV. If a value is present in the Datastore Record ID column, the import will try to update the existing record with that ID. If the Datastore Record ID column is empty, the import will create a new record. If any errors occur during the import process, you will be given the option to export the rows that failed.
When importing, the data is not validated, so be careful so you do not destroy your data.
Restrictions & Limitations
- Datastore forms can only be 1 page. If your datastore form has more than 1 page, it will not function properly.
- CSV Import does not validate data.
- CSV Import only works in modern browsers.
- Forward slash cannot be used inside the datastore name, or else the bridge creation will fail.