Format DataSet Column

Add a new formatted column to your DataSet using one or more existing DataSet columns as input. This includes adding various types of formatting to numbers and dates/times, and converting them to strings. This action is similar to the Format Value action, except instead of creating an individual formatted value, it creates a column of formatted values.

Inputs

Key

Default value

Description

dataSetUrl

Required

N/A

The URL of the DataSet JSON file to which you want to add a formatted column.

formatString

Required

N/A

A format string, using .NET composite formatting syntax, to be used for generating a new formatted column. For instance, {0:dddd dd MMMM} would convert a date input in each row of formatInputColumn1 into day of week, day and month; a value in the resulting column might read "Thursday 3 May".

formatInputColumn#

Optional

N/A

The names of the DataSet columns to be used in the format string. In the format string, formatInputColumn1 will be referenced as {0}, formatInputColumn2 as {1}, etc. While these inputs are optional, you will typically want to have at least one format column input.

formattedColumnName

Optional

<formatInputColumn1>_FORMATTED

The name of the formatted column to be added to the DataSet. This input is Required if there is no formatInputColumn1 input.

Outputs

Key

Value

dataSetUrl

The URL of the DataSet JSON file containing the original Data Set along with the new formatted column.

storageFileName

The name of the DataSet JSON file containing the original Data Set along with the new formatted column.

Usage

This action can be used to format some input columns of a DataSet before adding the DataSet to a GoFormz Data Source, a form table, or some external input. You can also use it to combine values from multiple columns in some way; this can be handy when creating a "Key" column for a GoFormz Data Source.

In the example below, we have a GoFormz customer Data Source that uses the company name, address, and contact name as its key, and we want to update this database from a Salesforce Query. Before we can compare the GoFormz data to the Salesforce data, we have to add a "Key' column to the Salesforce data to match the "Key" column format of the GoFormz data. This is what we are doing in the step shown below. We use a simple formatString that concatenates Salesforce "Company", "Address" and "Contact Name" columns with dashes in-between them, and stores them to a new "Key" column. Now we can compare the GoFormz and Salesforce data using their respective "Key" columns, and add rows to the Data Source as needed.

Note that this example simply concatenates several values without formatting the individual values in any way. For an example with more formatting, see the Format Value action documentation.