DataSet files in GoFormz custom workflows are JSON files that represent a two-dimensional data table with rows and columns. These files are used as outputs and inputs for a number of different actions. The remainder of this article goes over DataSet file structure, and thus requires some knowledge of JSON.

DataSet files must have two arrays:

  • A columns array containing the name and type of each row in the DataSet; and

  • A rows array containing the contents of each row.

Each item in the columns array must contain two fields:

  • name: This is the name of the column.

  • type: This is the data type for this column. It will usually be System.String, System.Integer, System.Double (for decimals) or System.Boolean (true/false values).

Each item in the rows array must contain N fields, where N is the number of items in the columns array — i.e. one field for each column. The field names must correspond to the column names, and their values must correspond to the column type.

Let's go over an example, taken from the "Parts" table of the Sample Work Order form that comes free in all GoFormz accounts:


{"columns":[ {"name":"Mfg.","type":"System.String"}, {"name":"Part","type":"System.String"}, {"name":"Description","type":"System.String"}, {"name":"Quantity","type":"System.Double"}, {"name":"Unit Price","type":"System.String"}, {"name":"Total Unit Price","type":"System.String"} ], "rows":[ {"Mfg.":"Aruba","Part":"ARB-AIR-ANT2460P-R","Description":"2.4GHz, 6 dBi Patch Antenna w/RP-TNC", "Quantity":4.0,"Unit Price":"$219.00","Total Unit Price":"$876.00"}, {"Mfg.":"Cisco","Part":"CS-AIR-CT5508-250-K9","Description":"5500 WLAN Cntlr up to 250 Lightwght APs", "Quantity":1.0,"Unit Price":"$93,995.00","Total Unit Price":"$93,995.00"}, {"Mfg.":"Motorola","Part":"MOT-AIR-LAP1131AG-K-K9","Description":"802.11ag LWAPP AP Integrated Ant, Korea", "Quantity":3.0,"Unit Price":"$699.00","Total Unit Price":"$2,097.00"} ]}

The columns in this example are "Mfg.", "Part", "Description", "Quantity", "Unit Price" and "Total Unit Price". All columns are Strings, except the "Quantity" column which is a Double. The DataSet has 3 rows, and each row has a value for each of the columns. All the string columns express their values in quotes, while the Quantity column values are decimals — 4.0, 1.0, 3.0. (Note that it might be useful for the "Unit Price" and "Total Unit Price" columns to be Doubles, but we've chosen to format them as currency strings instead of raw decimals.)

DataSets are used in many different actions. Some common actions that output DataSets are:

  • Get DataSource converts a GoFormz DataSource to a DataSet JSON file.

  • Get Form Table converts a form table to a DataSet file.

  • The Salesforce: Query action outputs a DataSet representing the query results, as do Query actions for other third party applications.

Common actions that take a DataSet as an input are:

Finally, there are a number of Utility Actions that manipulate DataSets, including Filter DataSet, Select DataSet Row, Compare DataSource To DataSet, and several others.

Did this answer your question?