Parameter Specification
A parameter is represented by a JSON object which defines the parameter's properties. Parameters are typically defined together as a list within a Form.
Specification
key |
type |
required |
dynamic |
default value |
description |
name |
string |
yes |
no |
n\a |
The unique identifier for parameter. Note that if this is empty, and the parameter is added to a form, it will be renamed to something non-empty (and unique within the form.) |
type |
enum |
yes |
no |
n/a |
The parameter type. |
valueType |
enum: string , stringEncoded , stringEncodedParts |
yes |
no |
n/a |
The type of the literal value. Internal Only: StringEncoded will fully fmeParsableText encode the value. StringEncodedParts is for values that are lists where the list elements/values should be fmeParsableText encoded but not the list itself. |
defaultValue |
any |
no |
no |
n/a |
The default value of the parameter. |
prompt |
string |
conditional |
no |
n/a |
A human-readable prompt for the parameter. Required when showPrompt is true . |
showPrompt |
boolean |
no |
no |
varies based on parameter type |
As a general rule, parameters which span multiple lines (tables, groups, etc) do not show the prompt by default and rely on the outer group to provide context. |
supportedValueTypes |
array\: ["expression", "globalParameter", "null", "noOp", "none"] |
no |
no |
["globalParameter"] |
A list of value setting methods to allow. "expression" includes attribute values. "literal" is not included in the enumeration as literal values are always allowed. To exclude all value types except literals, specify ["none"] . |
required |
boolean |
no |
no |
true |
If true a value must be entered for the parameter of the transformer will appear invalid. |
setValue |
string, object |
no |
yes |
n/a |
Logic to control the value of the parameter. Default is not to modify value. |
visibility |
enum, boolean |
no |
yes |
visibleEnabled |
Logic to control enabling, disabling and hiding the parameter. |
expressionSettings |
dictionary |
no |
no |
n/a |
A dictionary of settings related to defining an expression value type. |
choiceSettings |
dictionary |
no |
no |
n/a |
A dictionary of settings related to defining the choice list this parameter may present. |
deprecated
key |
type |
required |
dynamic |
default value |
description |
hidden |
boolean |
no |
no |
false |
If true parameter will not be shown in the ui, but its value will be stored. (Replaced by visibility.) |
deprecatedFlags |
array\: ["wholeline", "showZipButton", "noEdit", "disabledOnly", "alwaysEnabled", "forceDefs", "ignoreValue"] |
no |
no |
n/a |
Allows specifying a list of legacy flags. Note: setting this should be avoided at all costs when making new transformers or new versions of transformers. |
expressionSettings
key |
type |
required |
internal |
default value |
description |
sourcePorts |
array\ |
no |
no |
[] |
A string list of port names where attributes can be referred to. |
supportsConditionals |
boolean |
no |
no |
true |
Whether or not the expression supports conditionals. |
supportsAbort |
boolean |
no |
no |
false |
Whether or not abort can be used as a value. |
subsequentFeatures |
integer |
no |
yes |
0 |
Number of subsequent adjacent features to access for attribute references. Valid number values are integers in the interval [-1, 100]. If -1 is specified, the maximum number is used. |
priorFeatures |
integer |
no |
yes |
0 |
Number of prior adjacent features to access for attribute references. Valid number values are integers in the interval [-1, 100]. If -1 is specified, the maximum number is used. |
choiceSettings
key |
type |
required |
default value |
description |
choiceSet |
enum |
yes |
userDefined |
For text-based types, a keyword identifying a predefined set of choices to use for this parameter. By default, the encodings set includes fme-system (encoding of the operating system) and fme-binary (binary). |
include |
array\ |
no |
n/a |
A list of values to intersect with the choices defined by a choice set. Using 'exclude' at the same time as 'include' is not supported since it does not make sense. |
exclude |
array\ |
no |
n/a |
A list of values to exclude from the choices defined by a choice set. |
sort |
enum: noSort , naturalSort |
yes |
varies based on choice set |
Whether or not to sort the choice list. Default is for user defined choice sets is to do natural sort. The default varies for other choice sets. For example, encodings are sorted with the most common first. AttributeNames are alphabetic. |
choices |
array\ |
no |
n/a |
A list of dictionaries with the following keys, specifying a choice list used by the 'dropdown' and 'listbox' types. If present a text widget will have an additional dropdown that allows the user to select from a list of values. Only applicable on textbox-based types. |
choices
key |
type |
required |
default value |
description |
value |
string |
yes |
n/a |
The value of the choice to be used in the backend. |
useValueInTextEditor |
boolean |
no |
false |
If true the value will be shown to the user instead of the display string. |
display |
string |
no |
value |
The display string to be shown to the user. The string will be translated before being shown. If you have a choice that does not require translation, do not specify this property. |
icon |
path |
no |
n/a |
The path to an image file to use as an icon, shown as part of the choice. |
textFormatting |
dictionary |
no |
n\a |
A dictionary of formatting options to apply to the choice. |
textFormatting
key |
type |
required |
default value |
description |
bold |
boolean |
no |
false |
If true the display text will be bold. |
italic |
boolean |
no |
false |
If true the display text will be italicized. |
strikeout |
boolean |
no |
false |
If true the display text will be stricken out. |
underline |
boolean |
no |
false |
If true the display text will be underlined. |
Types
Choice Sets
Dynamic Properties
For interactions between parameters, see dynamicproperties
visibility
value |
description |
visibleEnabled |
The parameter will be enabled and visible in the UI, unless its parent parameter ("group" , "table" , or "multi" ) is disabled and/or hidden. |
visibleDisabled |
The parameter will visible, but disabled. |
hiddenEnabled |
The parameter will hidden from the UI but be treated as enabled internally. |
hiddenDisabled |
The parameter will hidden from the UI and disabled internally. |
true |
Synonym for "visibleEnabled" . |
false |
Synonym for "hiddenEnabled" . |
other value or undefined |
Default to "visibleEnabled" . |
visibility Example:
"visibility": {
"if": [{
"$hasValue": {
"parameter": "OFF_BUTTON",
"value": "OFF"
},
"then": "visibleDisabled"
}]
}
setValue
type |
description |
string |
The parameter value will be set to this string value. |
object |
The parameter value will be set to object "value" , but subject to extra conditions. |
other types or undefined |
The parameter value will not be modified |
"value"
Object
key |
type |
required |
description |
value |
string |
yes |
The parameter value may be set to this string value. |
override |
boolean |
yes |
If false , then "value" will be only be set if the user has not input a value. Otherwise the "value" will be set unconditionally. |
value string
Example:
"value": {
"if": [{
"$hasValue": {
"parameter": "X_MAKES_OTHER_Y",
"value": "X"
},
"then": "Y"
}]
}
In the above example, if "X_MAKES_OTHER_Y"
has value "X"
, then the parameter value will be unconditionally set to "Y"
.
value object
Example:
"value": {
"if": [{
"$hasValue": {
"parameter": "IF_X_THEN_SET_TO_Y_BUT_DONT_OVERRIDE",
"value": "X"
},
"then": {
"value": "Y",
"override": false
}
}]
}
In the above example, if "IF_X_THEN_SET_TO_Y_BUT_DONT_OVERRIDE"
has value "X"
, then the parameter value will be set to "Y"
if the user has not input a value for the parameter.
Example
"parameters": [
{
"name": "MESSAGE",
"type": "text",
"valueType": "stringEncoded",
"supportedValueTypes": ["expression", "globalParameter", "conditional"],
"prompt": "Log Message",
"required": true,
"defaultValue": "Feature is:"
},
{
"name": "MAXCOORDS",
"type": "number",
"valueType": "string",
"supportedValueTypes": ["expression", "globalParameter", "conditional"],
"prompt": "Max Coordinates Per Feature",
"required": true,
"defaultValue": 20,
"precision": 0
},
{
"name": "MAXFEATS",
"type": "number",
"valueType": "string",
"supportedValueTypes": ["expression", "globalParameter", "conditional"],
"prompt": "Max Features to Log",
"required": true,
"defaultValue": 20,
"precision": 0
},
{
"name": "FEATURE_TYPE",
"type": "text",
"valueType": "stringEncoded",
"supportedValueTypes": ["expression", "globalParameter", "conditional"],
"prompt": "Feature Type Override",
"required": "false"
}
]