Supported parameter attributes

A list of parameter attributes which are supported in ScriptRunner Actions

You can use the following parameter attributes in ScritRunner Actions.

Parameter attribute Description
[Parameter(Mandatory = $true)]
  • Indicates that the parameter is required.
  • The action can only be started if this parameter contains a value.
[Parameter(ParameterSetName = 'Set 1')]
  • Displayed as a drop-down list.
  • After selecting the parameter set, only the parameters contained in this set are displayed.
[Parameter(HelpMessage="ASRDisplay(Multiline)")]
  • Size of the input field can be resized
  • Standard size is five lines
  • Works only in our recommended web browsers
ValidateSet
  • Displayed as a drop-down list.
  • If the parameter is declared as an array, multiple selection is possible.
ValidateRange, ValidateCount
If the value is outside the range, the action cannot be started.
ValidateLength
If the length of the value is outside the range, the action cannot be started.
ValidatePattern
If the value doesn't match the regular expression pattern, the action cannot be started
[Parameter(HelpMessage="ASRDisplay(Readonly)")]

The input field is read only. The parameter value can't change.

[Parameter(HelpMessage="ASRDisplay(Splatting)")]

The parameter must be from type [hashtable] or [PSCustomObject]. An encoded hashtable from a query result can automatically assign the included individual parameters, if the names of the parameters match.

 

This page has been automatically translated and may contain grammatical errors or inaccuracies