Skip to main content
Calculator Parameters

Creating and referencing parameters in a Calculator mapper step.

Praise Magidi avatar
Written by Praise Magidi
Updated over 8 months ago

A Parameter is a value, object, or code snippet used to simplify configuration, facilitate the reuse of common info, and provide extra security, through encryption.

There are three ways in which parameters can be used in the Calculator step:

  • Text as a parameter.

  • Record as a parameter.

  • Date as a parameter.

The image illustrates a flow where parameters are created in a Calculator mapper step and then referenced in an Email destination step.

The Record Generator source step has data as illustrated in the image below.

Text as a Parameter

The output for the Record Generator source step is the below image. The Parameters field is empty because there is no parameter that has been created as yet.

Parameters can be viewed by testing the flow and clicking on the Detailed tab as highlighted in the below image.

Creating a Text Parameter

To add a text parameter in the Calculator step, follow these instructions:

1. Type the JSON code as shown in the image below to create the parameter.

2. Type the desired parameter name to add the Parameter field and then the required text as shown in the image below.

The parameter will be referenced as shown in the results illustrated in the image below. Click on the Detailed tab to view the parameter that was created.

Record as a Parameter

The output for the Record Generator source step is the below image. The Parameters field is empty because there is no parameter that has been created as yet.

Parameters can be viewed by testing the flow and clicking on the Detailed tab as highlighted in the below image.

Creating a Record Parameter

To add a record parameter in the Calculator step, follow these instructions:

1. Type the JSON code as shown in the image below to reference a record.

2. Select the required field from the record to reference from the available list. All fields within the dataset will be referenced.

The parameter will be referenced as shown in the results illustrated in the image below. Click on the Detailed tab to see the parameter field.

Date as a Parameter

The output for the Record Generator source step is the below image. The Parameters field is empty because there is no parameter that has been created as yet.

Parameters can be viewed by testing the flow and clicking on the Detailed tab as highlighted in the below image.

Creating a Date Parameter

To add a date parameter in the Calculator step, type the code as shown in the image below to reference a parameter.

The code pulls the current date from your local machine and formats it. In this example, it formats the date to YYYY-MM-DD. The format can be changed as required. The below link provides assistance with the date formats that are available in the DayJS library:

The parameter will be referenced as shown in the results illustrated in the image below. Click on the Detailed tab to see the parameter field.

Multiple Parameters

The Calculator mapper step can be used to reference multiple parameters. The image below illustrates the Calculator mapper step where the email address , record and date are added.

The parameters will be referenced as shown in the results illustrated in the image below. Click on the Detailed tab to see the parameter field.

Referencing Parameters in Other Steps

Once created, parameters can be referenced in other steps. In this example, an Email destination step is used to reference the multiple parameters. The Email destination step is shown in the image below.

The image below shows the email received with the referenced parameters.

Did this answer your question?