Create a global data model
-
Navigate to
.
The Data models page appears.
-
Click
New.
The new data model appears in a tree form under the Design tab and opens in a new browser tab.
- You can change the default name and provide a meaningful and unique name for the data model. A name can have a maximum of 40 characters.
- Optional. Provide a Description of the data model.
- By default, the data model is placed in your default working category. To place it in a different category, on the Category list, select a category.
- Add fields to your data model.
-
Save or release the data model.
The new data model appears on the Data models list page.
Add fields to a data model
You can add fields to a data model and then add child fields.
-
Do either of the following to add a field:
-
On the Design tab, from the Field list, select a field type. The selected field type is added to the data model.
-
Click adjacent to the data model. By default, a new field, FIELD1 of type Text is added to the data model.
-
- To change the name of the field, double-click the field and enter a meaningful and unique name. Alternatively, in the Field properties, in the Name field, enter a name.
-
To change the field type, on the
Type list, select the field type as needed. The supported field types are:
-
Text: String
-
Boolean: (Default: Clear)
-
Date: (Default: Current date)
-
Number: Includes decimals and integers. (Default: 0)
-
Object: Includes nested objects; up to nine levels of nested objects are supported.
-
List: Repeating data can be represented in lists. Lists can be simple types or a list of name objects.
You can include all the above fields types within the Data object and the List type fields.
-
-
Optional. Select either of the following for the field types as a
Default value.
-
Null: Assigns a null value to a data model field.
-
You can specify the required value in the below field types.
Text
You can enter a string value in the text box.
Number
You can specify a number to a data model field.
Date
You can specify the date to a data model field.
The default value is assigned when the data model gets created.
-
You can select the "Default Value" checkbox for Boolean field type.
-
The default value is not available for the Object and List field types.
-
-
Additionally, configure the display properties for the fields.
Type
Display properties
Text
-
Control type: Select one of the following controls as needed.
Single line
If selected, adds a text box for the single line fields, such as name.
Multi line
If selected, adds a text box that may go beyond one line, such as customer address.
Drop down If selected, adds a drop-down list based on the selected Data source. Available data source options are:
Lookup Select an existing lookup.
Static To enter static data, do the following:
-
Click .
-
Add a Name.
-
Click Add.
to add the values. -
To make it a default value, select Default.
Add more items as needed.
Email If selected, adds a text box to an Email field type.
-
-
Max number of characters: Provide the maximum number of characters allowed to enter in the input type selected above. (Default: 10,000)
-
Mandatory: If selected, makes the input type mandatory.
Number
-
Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default Minimum value: -2,147,483,648); (Default Maximum value: 2,147,483,647).
Date
Min date and Max date: Set the minimum and maximum date values by selecting the required date and time using the calendar picker.
-
- Repeat the preceding steps to add more fields.
-
You can create child fields within a field. To create a child field, select the field and click
Then follow the same steps as you did for creating a field.
You can add a child field of Column type under the Object field type.
You cannot add an object or list field to the 9th level of your nested object and list fields.
-
You can rearrange the fields using drag and drop. The updated field order is automatically reflected even in the
Data object variable being used in the workflow.
-
You can reorder the entire object, or fields that are at same level or within a list.
-
You can move the entire object or list up and down, or move fields from one object to another object; however, you cannot move the fields out of a list.
-
Set a list child field as unnamed
You can set a list child field to be “unnamed”.
An unnamed child field can only exist under a list field and can only contain simple data types.
A parent list field can contain only one unnamed child field.
If the fields are unnamed then the first item of the list is used to determine the type of the items in the array.
TotalAgility does not support mixed arrays, that is, an array with entries of different data types such as String and Number.
In the following JSON example, the text in bold is a list of unnamed items that is held as a child element in an object.
{
"make": "VOLKSWAGEN",
"model": "TIGUAN",
"dateFirstUsed": "23 JULY 2009",
"fuelType": "DIESEL",
"colour": "SILVER",
"engineSize": "1968",
"registrationDate": "23 JULY 2009",
"manufactureDate": "23 JULY 2009",
"manufactureYear": "2009",
"motTestReports": [
{
"testDate": "27 NOVEMBER 2020",
"expiryDate": "26 NOVEMBER 2021",
"testResult": "PASS",
"odometerReading": 99946,
"odometerUnit": "mi",
"motTestNumber": 647548533803,
"advisoryItems": [
"Front Shock absorbers light misting of oil or has limited damping effect both (5.3.2 (b))",
"Nearside Rear tyre perished tread area",
"Nearside Front tyre getting low 3mm",
"brake discs worn"
],
- Select the list field for which to create an unnamed child field.
- Click .
- Enter a Name and a Display name for the child field.
- On the Type list, select simple data types such as Text.
-
Select
Unnamed.
The child field is treated as an unnamed special field.
- Optional. Provide a Default value.