Creating a user parameter is a simple way to quickly expose a parameter in the workspace. This is useful if you want to set visible default values, or if you want to be able to easily change a parameter from workspace to workspace.
There are different ways to create user parameters:
The method you choose will determine the fields that show in the Add/Edit Parameter dialog. Fixed parameters will not be shown; all parameters are described following the table.
Tip: If you have never worked with Parameters, it is easier to start with an existing parameter because the Type will automatically be chosen.
User Parameter Type | Description | Add/Edit Parameter Dialog |
---|---|---|
To add a new user parameter that has no existing properties |
Right-click the User Parameters icon in the Navigator, and click Add Parameter. This is a new parameter, so you will have to fill in all required fields. Click OK to add the parameter to the workspace. |
|
To create a user parameter from an existing workspace parameter |
Right-click a Workspace Parameter in the Navigator, and click Create User Parameter. Most fields are already filled in based on the parameter's existing information. You can edit the fields; however, changing the Type is not recommended. Click OK to add the parameter to the workspace. Detailed example: See Publishing a Parameter in the FME Workbench help. |
|
To create a user parameter from an existing transformer parameter (Navigator) |
Right-click a Transformer parameter in the Navigator, and click Create User Parameter. Most fields are already filled in based on the parameter's existing information. You can edit the fields; however, changing the Type is not recommended. Click OK to add the parameter to the transformer. |
|
To create a user parameter from an existing transformer parameter (Transformer Parameters menu) |
Click the Transformer Parameters menu and click Link to Parameter > Create User Parameter. You can edit all the fields. Click OK to add the parameter to the transformer. |
You can create many different parameter types and options.
Choice: Creates a parameter that allows you to choose one of two values.
Choice (Multiple): Creates a parameter that allows you to choose from multiple values.
Choice or Text: Enter a text string or select one from a pick-list.
Choice with Alias: Add selected readers, writers, or coordinate systems.
Choice with Alias (Multiple): Similar to Choice with Alias but the display alias for this type is mapped to an internal value, and is returned as the parameter value instead.
Color Picker: Creates a parameter for changing the FME color value.
Coordinate System Name: Creates a parameter for choosing a coordinate system.
Directory: Creates a parameter that allows you to choose the name (and path) of a directory.
Filename (Existing): Creates a parameter for choosing the name and path of a file.
Filename (Output): Creates a parameter for choosing the name and path of the output file.
Float: Creates a parameter for choosing a floating point number.
Integer: Creates a parameter for choosing an integer.
Password: Creates a parameter for entering a password.
Scripted (Python): Creates a parameter from a Python script (Private parameter only). Python is described in more detail in FME Workbench help.
Scripted (Tcl): Creates a parameter from a Tcl script (Private parameter only). Tcl is described in more detail in FME Workbench help.
Slider: Creates a bounded numeric value.
Text: Creates a parameter for entering a text string.
Text (Multiline): Opens an editor to enter a multi-line text string. The first line will show in the parameter but to edit the text, you must open the editor.
If you uncheck this box, the parameter will be created as a Private parameter.
It might not be important in every instance to use the value from this particular published parameter. Flagging the parameter as Optional ensures that it can continue with an empty value.
The parameters required in this field are dependent on the Parameter Type you choose. Click the browse button beside the parameter to see the applicable configuration choices. For example, you can:
Enter a name. This will appear under the Published Parameters icon in the Navigator pane.
Enter the prompt that will appear when you run the workspace.
Choose the default value that will be used.
All user parameters will be listed in the User Parameters section of the Navigator.
Tip: To quickly change a value only, double-click on a Parameter.
Note: If you filter the list by keyword, the list will dynamically update as you enter the keyword – clicking OK will close the dialog.