Fill Form Fields

Fill form fields using values from a DataSet file. This action is very similar to the Fill Form Table action. Its purpose is to fill a set of table-like repetitive form fields that are not represented via a table. See the Usage section below for an example of what this might look like.

In order for this action to work, the names of the form fields you want to fill must follow a specific syntax. Form fields that are to be filled by a certain DataSet column must have the same name followed by a suffix character (an underscore by default) and increasing numbers starting with one — e.g. Price_1, Price_2, etc.






The unique 32-digit hexadecimal identifier of the form containing the fields you want to fill. See here for more on form IDs.



The name of the DataSet file that should be used to fill the fields.



A specification of how the DataSet columns map to form field columns, using the following syntax: <dataset_column~field_name_prefix|dataset_column~field_name_prefix|...>. For instance, suppose the fieldMapping is SKU~SKUNumber|Description~Description|PurchaseCost~Cost. This means that:

  • the DataSet's SKU column maps to the form fields with prefix SKUNumber (i.e. SKUNumber_1, SKUNumber_2, etc.);
  • the DataSet's Description column maps to the form fields with prefix Description;
  • and the DataSet's PurchaseCost column maps to the form fields with prefix PurchaseCost.

DataSet columns that are not included in the mapping will be ignored.



In the form field names to be filled, this is the character that should go after the field prefixes in the fieldMapping and before a number. This defaults to "_" (the underscore character).

For example, suppose suffixChar is "." (the period character) and one of the field prefixes in the mapping is "Price". Then the form fields filled by this action will be "Price.1", "Price.2", etc.




Many forms contain some version of the situation displayed below:


Here we have tabular information, but it isn't quite formatted as a table, and cannot be represented as a table in GoFormz because the "Description" field for each table item has its own separate row, so each item actually takes up two rows. The Fill Form Fields action is an analogue to the Fill Form Table action that is designed to handle this kind of scenario, where you have tabular information but a Table field cannot be used because of the way it's laid out.

Below we illustrate the same scenario as we do in the Fill Form Table example, but using Fill Form Fields instead. Suppose you have some common jobs that require the same standard list of parts, with some minor deviations. Rather than having your technicians fill out the parts fields with the same items every time, you want to fill the table automatically whenever you dispatch the form.


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 Fields action pairs, each one adding the appropriate set of parts to the new form for a different common scenario. Let's take a look at the Fill Form Fields 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 fields (dataSetStorageFileName) comes from a Google Sheet. In this example, we have also changed the suffix character from the default underscore to a dash. So for instance the "Manufacturer" column from the DataSet will fill the following fields names in the form: "Mfg-1", "Mfg-2", etc., where the numbers correspond to the row number in the DataSet.