Creating a SubFunction

Follow the procedure below to create a SubFunction and then design the SubFunction's mapping.

Selecting a Function Collection

To create a SubFunction in a new function collection, see Creating a Function Collection. To add a SubFunction to an existing function collection, do one of the following:

Defining Inputs, Outputs, and Parameters

In the New Function dialog box that's displayed, enter a name for the SubFunction and specify the following settings.

Inputs and Outputs
Min Input Count The minimum number of inputs. In a mapping, you need to link at least this number of inputs to the SubFunction.

Or, you can set the MinInputCount to 0 if the function outputs data but doesn't have any inputs, like the CONST function under the String tab.

Max Input Count The maximum number of inputs.
Output Count The maximum number of outputs. You can set this to a number that's greater than 1.

When you set the Output Count property, the Flow Designer increases the number of output nodes displayed for the SubFunction. For an example of a function that has multiple outputs, see the DATESPLIT function, under the Date tab.

Function Parameters
Variable Name Enter the parameter name. You can set a display name that makes your mappings easy to understand. You can use single and multibyte character sets.
Type Select the data type. When you map a value to the parameter, the input is converted to this data type.
Default Enter a default value.

Note

Note the following conditions for the SubFunction name to be valid:

  • The SubFunction name must be unique in all function collections.
  • You can't use the following characters in the SubFunction name:
    !\"#$%&'()=~^|\\@`+*;:{}「」,.<>/?\t
  • The name is case sensitive.
  • You can use the single-byte space character and Japanese character sets, or other multibyte character sets.
  • There isn't a limit to the length of the name.

Designing a SubFunction's Mapping

After you create a SubFunction, you can design the mapping in the function window that's displayed. You can also open the SubFunction from the tree pane.

In the mapping area, you can map the SubFunction's inputs to outputs and transform data by chaining mapper functions. In the mapping area's toolbar, you can create layers to simplify complex mappings. Or, execute a layer if a conditional expression evaluates to true.

See below to get started with the basic workflows.

Setting Properties and Parameters

In the mapping area, the SubFunction's inputs and outputs reflect the Max Input Count and Output Count properties.

Configure the SubFunction's properties in the inspector and define function parameters on the Variables tab.

Outputting Logs from a SubFunction

To output logs from a SubFunction, drag a link to the Log node in in the function window's output pane.

Using Layers to Create SubFunctions

You can use the toolbar at the bottom of the function window to create, edit, list, and simulate layers. You can configure a layer to execute when a conditional expression evaluates to true, and you can build conditional expressions using autocomplete. See Using Layers for procedures.

Other Workflows

See Mapper Functions to use the graphical editing tools to select, cut, copy, and paste mapper functions. See the following pages in "Mapper Components" to speed up your workflow for linking inputs and outputs.

Next Steps

Add the SubFunction to a mapping and connect inputs and outputs.
 

To the top of this page