Custom Table Type Variables
If you want to use a table as a global, input, output, or local variable, you need to create a table variable type. Custom tables are similar to an Excel spreadsheet. You define the columns in the table and then add, remove, or update rows.
The maximum number of custom variable types (array, object, and table) allowed is 200 total per organization.
-
Choose Automate > Variables in the navigation menu
-
Click the Variable Types tab and then click New Variable Type.
-
In the Data Type drop-down list, choose Table Type.
-
Enter a meaningful Display Name and optional Description.
-
Define attributes for each of the Columns you want in your table:
- Required - Defines whether the field is required.
- Field Name - The name of the field when used as a variable.
- Field Title - A human-readable field name.
- Field Type - The data type of the field.
- Max Length - The maximum length for values in this field (for strings).
- Minimum - The minimum value (for numeric data types).
- Maximum - The maximum value (for numeric data types).
-
Click Add 1 More Field to add another column.
-
Click Submit.
Here is an example of a table called My Endpoint Table that contains a list of endpoints and whether or not they are active:
The columns in this table include:
- ip_address - The endpoints IP address as a string no longer than 15 characters.
- hostname - The endpoint’s hostname as a string.
- is_active - Whether the endpoint is active, as a Boolean value (true/false).
Using a custom table type is similar to any other variable type. You select your custom type as the Data Type or enter its name.
However, when you use a table type as a global variable, you must provide at least one row to create the variable.
Here is an example of a global variable that uses a custom table type with one row:
Using a custom table type within a workflow is the same as any other variable type. You select your custom type as the Data Type and then provide a display name and scope. You can add default rows if you want, but it is not required.
Custom table types behave the same as any other table when used within a workflow. For more information about using tables, see the Table Activities Help topic.