Use data table requests to perform database CRUD functions on Mirata Data Table records.
The first step to create a data table request is always to select the Data Table you’re updating or querying and the Request Type.
|
|
|
Create a new record in a data table.
|
|
Update the record that has the same key as the one provided.
|
|
If a record already exists with the provided key, then update it. Otherwise, create a new record.
|
|
Delete the record that has the same key as the one provided.
|
|
Get a list of data table records based on some criteria.
|
|
Delete a list of data table records based on some criteria.
|
Add / Update / AddUpdate
After you select a Data Table and Request Type, the list of all columns in that data table’s schema will appear in your request. Columns that are required by the data table’s schema are designated with an asterisk (“Record Key” in the below example). For example, the list of columns under “Request Editor” here (Record Key, AnodeType, etc.):
Are directly coming from the schema of the data table “Rectifier”:
In the row for each column from the data table’s schema, select a Type and Value. For Type, you can select one of the below options. Based on your selection for Type, you’ll have different input options for the Value. The first two options, constant and input parameter, are going to be the ones you’ll likely use most often.
|
|
|
Send the same, constant value to this column every time.
|
|
Provide a value in the open field.
|
For designers can map a value to dynamically send from the form.
|
|
Select an input parameter from the provided dropdown.
- The list of input parameters will be filtered by data type.
- If the field is required in the data table’s schema, then only required input parameters will show in the list.
|
Send a piece of form/user metadata (including form ID, form assigned by, form submitted by, user name, user email, and user external ID) to this column.
|
|
Select a piece of metadata from the provided dropdown.
|
A more advanced option - Send the result of an expansion string to this column: you can string together input parameters and constant values by putting input parameters inside “{ }”.
|
|
Provide a value in the open text field.
|
Always send Null to this column.
|
|
|
Always send an empty string to this column.
|
|
|
Record Key
Every data table has “Record Key” as the first column in its schema. This is the unique identifier for each record in the table - no two records in a data table can have the same Record Key.
- When adding records, make sure to provide a unique Record Key, one that no existing record in the table could have. We recommend using an input parameter and then in the designer, use the join-list-of-strings calculation to string together the datetime, submitter’s name, and any other form-unique data.
- When updating records, the Record Key is what will be used to find the matching record.
Query / Delete / QueryDelete
After you select a Data Table and Request Type, you’ll be presented with our zero-code Query Editor in which you can build out your query using the “+ADD” button to add columns from the selected Data Table and map them to expected values.
In this example, we have a data table that holds acceptable Line Numbers for specific Regions:
This is what a query would look like to get the Line Numbers applicable to a specific Region:
You could use this query to populate the options in a dropdown field or a list on a form.
You can tie a data table request integration action to transitions in your form’s workflow. To do this:
- In the Workflow Designer, select your transition
- Under “Integration Actions”, click the + button
- Select your Integration Action
- If your action has input parameters, they’ll be listed under Input Data so that you can map them to form data (like Name, Country, … in the below screenshot)
- Use to select a form field
- Use to use a calculation
- Optionally, use “For Each in Array” to run this action for each row in the selected array
- Optionally, you can set a filter so that this action doesn’t always run during this transition