Fill Form Table

Fill a form table with values from a DataSet file.

Inputs

KeyValue
formIdRequiredThe unique 32-digit hexadecimal identifier of the form containing the table you want to fill. See here for more on form IDs.
dataSetStorageFileNameRequiredThe name of the DataSet file that should be used to fill the table.
tableName1RequiredThe field name for the table you want to fill.
tableName2, tableName3, etc.OptionalField names for any additional tables that you want to fill. These tables will be used as overflow in case the DataSet has more rows than the first table. These tables will typically have the same columns as the first table, but note that the don't have to, since you can specify a separate mapping for each table.
tableMapping1RequiredA specification of how the DataSet columns map to table columns, using the following syntax: <dataset_column~table_column|dataset_column~table_column|...>. For instance, suppose the tableMapping1 value is SKU~SKUNumber|Description~Description|PurchaseCost~Cost. This means that:

the DataSet's SKU column maps to the table's SKUNumber column;
the DataSet's Description column maps to the table's Description column;
* and the DataSet's PurchaseCost column maps to the table's Cost column.

DataSet columns that are not included in the mapping will be ignored. Table columns that are not included in the mapping will be left as is.
tableMapping2, tableMapping3OptionalTable mappings corresponding to the additional tables. These use the same syntax as tableMapping1.

Outputs

KeyValue
tablesUsedThe number of tables to which data was added.

Usage

Suppose you have some common jobs that require the same standard list of materials, with some minor deviations. Rather than having your technicians fill out the materials table with the same items every time, you want to fill the table automatically whenever you dispatch the form. The example below shows how you might do this.

930

In this example, a new form is dispatched from Salesforce (i.e. the form is created based on a Salesforce event), and then we have a series of Get Google Sheet and Fill Form Table action pairs, each one filling out the Parts table in the new form for a different common scenario. Let's take a look at the Fill Form Table step highlighted in the image above. This step only executes if the "Standard_10x20_Pool" checkbox is checked in the Salesforce Work Order object (see the skip_if_false input). The data for the Parts table (dataSetStorageFileName) comes from a Google Sheet, and there is a second table in the form called PartsOverflow that gets filled in if the Parts table runs out of space. Both tables have the same columns, so the mapping is the same for both tables.