Creating and Modifying User Parameters
There are different ways to create user parameters:
- Add a new user parameter.
- Create a user parameter from an existing transformer or workspace parameter.
The method you choose determines the fields that show in the Add/Edit Parameter dialog. The configurable fields in the dialog are described following the table.
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. |
|
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 dialog) |
Click the menu beside a parameter in the parameters dialog of a transformer and click User Parameter > Create User Parameter. You can edit all the fields. Click OK to add the parameter to the transformer. |
Add/Edit Parameter Dialog Fields
Attribute List (Comma Delimited and Space Delimited): Creates a parameter for selecting items from a comma-delimited or space-delimited attribute list.
Attribute Name: Creates a parameter for choosing the name of a feature type attribute.
Choice: Creates a parameter that allows you to choose one of x values (for example, a or b or c...).
Choice (Multiple): Creates a parameter that allows you to choose multiple values (for example, a and b and c....).
Choice or Text: Enter a text string or select one from a pick-list.
Choice with Alias: Similar to Choice, but allows you to map a user-friendly display value (alias) to an actual value. Choice with Alias is useful when actual values have little meaning or may be misunderstood by the user. For example, you can display a full format name but alias it to an abbreviated format name or file extension.
Choice with Alias (Multiple): Similar to Choice with Alias but you can map multiple values to the same alias. For example, you might want to display Park but alias this to Recreation Center, Community Pool, and Playground).
Color Picker: Creates a parameter for selecting the FME color value.
Coordinate System Name: Creates a parameter for choosing a coordinate system.
Date/Time: Creates a parameter for entering a date and time.
Filename (Existing and Output): Creates a parameter for choosing the name and path of an existing file, or an output file.
Filename (Multiple): Creates a parameter for choosing the name and path of multiple existing files.
Float: Creates a parameter for entering a floating point number.
Folder (Existing and Output): Creates a parameter that allows you to choose the name (and path) of an existing folder, or an output folder.
Integer: Creates a parameter for entering an integer.
Password: Creates a parameter for entering a password.
Scripted (Python): Creates a parameter value from a Python script (Private parameter only).
Scripted (Tcl): Creates a parameter value from a Tcl script (Private parameter only).
Slider: Creates a bounded numeric value.
Text: Creates a parameter for entering a text string.
Note: Any leading or trailing white space is automatically trimmed. To maintain white space, use Text (Multiline).
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.
Note: Any leading or trailing white space is maintained.
Text (Multiline or Number): Opens a text editor for entering a multi-line text string, or an arithmetic editor for entering a number. If the Default Value field is blank or created using the text editor, then a text editor opens. If the Default Value field is created using the arithmetic editor, then an arithmetic editor opens.
URL: Creates a parameter for entering a URL.
Enter a name. This will appear under the Published Parameters icon in the Navigator pane.
If you uncheck this box, the parameter will be created as a Private parameter. See About Parameters.
Flagging the parameter as Optional means that an input value is not required for this parameter. If a parameter is not Optional, the workspace will not run unless the user inputs a value.
Enter the prompt that will appear when you run the workspace.
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:
- Populate a list and the contents will be displayed in a pull-down menu when the parameter is published;
- Point to a file or folder;
- Import attribute values from other datasets;
- Add readers, writers and coordinate systems
If Type is Filename, click the ellipsis (...) to apply filters on the filenames that can be selected. In the Edit File Filter dialog, specify the filter 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.
If Type is URL, specify the URL protocol that is allowed. For example, http, https, or ftp. To specify multiple protocols, use the %
separator. For example, http%ftp.
Choose the default value that will be used.
All user parameters will be listed in the User Parameters section of the Navigator.
Usage Notes
- After you create a Published Parameter, run the workspace by clicking Prompt and Run Translation . You will get a good idea how the parameters will affect the workspace just by viewing the prompt dialogs and parameter choices. (Note that this will not work for Private Parameters, since they are not prompted.)
- You can reorder the parameters in the Navigator by dragging them up or down, or by using the Move Up or Move Down menu item.
- Reader and Writer dataset parameters are published by default. If, for example, a file is missing, you will see a warning.
Modifying User Parameters
- Select the parameter, right-click, and select Edit Value or Edit Definition.
- Edit the desired fields and click the OK button.
Tip: To quickly change a value only, double-click on a parameter.
- Select a parameter, right-click, and select Delete.
- Select the parameter, right-click, and select Apply to.
- In the Apply Published Parameter dialog, click the checkbox next to other workspace parameters.
Tip: If you filter the list by keyword, the list will dynamically update as you enter the keyword – clicking OK will close the dialog.
- Click OK to copy the published parameter to the additional selected parameters.
- Right-click on the parameter and select Convert To Private Parameter or Convert to Published Parameter, or
- Edit the Parameter settings and uncheck the Published checkbox.