Create a global data model

You can create a global data model in TotalAgility. A global data model is available to all processes, rules, custom services, and forms.
  1. Navigate to System data > Data models.

    The Data models page appears.

  2. Click New.

    The new data model appears in a tree form under the Design tab and opens in a new browser tab.

  3. 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.
  4. Optional. Provide a Description of the data model.
  5. 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.
  6. Add fields to your data model.
  7. 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.

  1. 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.

  2. 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.
  3. 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.

  4. Optional. Provide a Default value.

    The default value is assigned when the data model gets created.

    The default value is only available for Boolean, Date, and Number field types.

  5. 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:

      1. Click .

      2. Add a Name.

      3. Click Add.

        to add the values.
      4. 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.

  6. Repeat the preceding steps to add more fields.
  7. 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.

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"
      ],

  1. Select the list field for which to create an unnamed child field.
  2. Click .
  3. Enter a Name and a Display name for the child field.
  4. On the Type list, select simple data types such as Text.
  5. Select Unnamed.

    The child field is treated as an unnamed special field.

  6. Optional. Provide a Default value.