Creating and Modifying User Parameters
To create user parameters and manage existing ones, open the User Parameters dialog. From the Navigator, right-click on the User Parameters icon, and select Manage User Parameters. Alternatively, from the menu, select Tools > Manage User Parameters.
In the User Parameters dialog, the left pane lists all the existing user parameters for the workspace. (They are also listed in the User Parameters section of the Navigator.) You can click and drag on the parameters or use the toolbar icons to perform the following:
- Change the order of the parameters at runtime. (You can also reorder the parameters in the Navigator by dragging them up or down.) Order is important because it affects when parameters are evaluated in the workspace. In particular, the value of one parameter may depend on another parameter that is evaluated earlier.
- Remove a parameter.
- Edit a parameter: Click on one to select it. The parameter's properties display on the right pane.
- Add a parameter: Click the Insert icon (+) and select the type of user parameter you want to add (see Parameter Types, below). The parameter is added below the currently-selected parameter. In the right pane, configure the properties of the parameter according to its type (see Parameter Properties (Right Pane), below).
- Arrange parameters in group boxes: Click the Insert icon and select Group Box. In the left pane, a group box is added below the currently-selected parameter. Click and drag other parameters into the group box as desired. In the right pane, configure the properties of the group box (you may need to re-select the group box to show its properties). You can configure the group box label (Prompt) and how the group box appears initially at runtime.
When finished, click OK.
To view how the parameters display at runtime, click Preview.
Parameter Types
Parameter Type | Creates a Parameter to... |
---|---|
Choice | Choose one or more values. |
Color | Select a color value. |
Datetime | Enter a date and time. For information about output formats, see Standard FME Date/Time Format. |
File/URL | Choose the names and paths of existing files or folders, an output file or folder, or a URL. |
Message | Display a message at runtime. |
Number | Enter an integer or floating-point number. The number can be bounded or unbounded based on the specified Configuration. |
Password | Enter a password. |
Text | Enter a text string. |
Yes/No | Select or unselect a checkbox. |
Attribute Name | Choose feature type attributes or items from a comma-delimited or space-delimited attribute list. |
Coordinate System | Choose a coordinate system. |
Database Connection | Choose a database connection. |
Geometry |
Enter a geometry as a set of spatial coordinates in GeoJSON. Tip: To handle the JSON data returned by this parameter: |
Reprojection File | Choose a grid shift file for reprojecting data. |
Web Connection | Choose a web connection. |
Scripted | Write a Python or Tcl script that assigns the value of a parameter to the workspace at runtime. |
Parameter Properties (Right Pane)
A short, unique name for the parameter. This name is used to reference the parameter in values (for example, $(myIdentifier)) and menus.
The prompt for the parameter that appears when you run the workspace.
If checked, the parameter is created as a published parameter. If unchecked, the parameter is created as a private parameter. For more information, see Working with User Parameters.
If checked, the workspace does not run unless the user inputs a value. If unchecked, an input value is not required for this parameter.
Tip: Mouse over a user parameter entry in the Navigator to discover if it is optional. Parameters include either [optional] or [required] in the tooltip.
This setting controls whether the end user can select an attribute to provide values to a user parameter. If checked, the user cannot specify an attribute value for the value of the user parameter. If unchecked, FME determines if the user can specify an attribute value for the value of the user parameter, in addition to any values allowed by the parameter type. FME determines whether the parameter allows specifying an attribute value based on the parameter referencing the user parameter.
The parameters required in this field depend on the parameter type you choose.
You can populate the choices to display in a list, a drop-down menu, or tree view.
If Tree is selected, specify a Tree Node Delimiter for the nodes of the tree. Then specify the Choices, using the delimiter to indicate under which node to place the value.
For example, this configuration uses a comma to delimit building choices by building site:
Mouse-over to view:
When the parameter is published, the choices appear like this:
Mouse-over to view:
- Path Selection:
- Multiple Paths: Allows for selecting multiple items.
- Single Path: Allows for selecting a single item.
- Existing Path: Allows for selecting a single item that must already exist on the system at runtime.
- Specify Extension Filters: If checked, allows you to apply filters on the filenames that can be selected. Specify the filters in the Filter field, and an optional description in the Description field. Wildcard characters and logical operators are supported in the Filter field. For example, to allow any file with a .shp extension, specify *.shp. To add or remove filters, or move filters higher or lower in the list, click the add (+), remove (-), or directional arrow symbols. To specify more than one condition in the same filter, use the OR operator; for example, *.shp OR *.dbf. To allow any file to be selected, leave this field blank.
- Restrict URL Schemes: If Items to Select is URL, check this box to specify the URL protocols that are allowed. http and https are listed by default. To specify other protocols, double-click inside an empty row, type the protocol, and press enter. To add or remove protocols, select and click + or -, respectively.
Note: These parameters apply only to workspaces that are run from FME Server.
You can configure the following parameters if Geometry Encoding is GeoJSON:
- Geometry Types: The geometries that may be specified. If the coordinates that are entered do not validate to any of the specified geometries, an error is returned.
- Specify initial bounds for map display: If checked, the map picker interface for entering coordinates is limited to the specified Top, Left, Bottom, and Right coordinates.
Choose the default value that will be used.
Modifying User Parameters in the Navigator
To edit the default value of a user parameter
Select the parameter, right-click, and select Edit Value. Alternatively, double-click on the parameter.
To edit the default value of multiple user parameters
Right-click on User Parameters, or any single user parameter, and select Edit User Parameter Default Values.
To remove a user parameter
Select a parameter, right-click, and select Delete.
To apply the value of a user parameter to one or more other parameters
Select the parameter, right-click, and select Apply to.
Tip: If you filter the list by keyword, the list dynamically update as you enter the keyword.