Table of Contents
Users can configure regular expressions (to force the selection of certain parameter values for certain users) and visibility expressions (to hide the parameter based on the visibility expression's result) for parameters to customize the Start Workflow form in Portal:
Regular Expressions
A A regular expression (shortened as as regex) is a sequence of characters that define a search search pattern. This pattern is used in Start Workflow form for input form for input validation to allow/prevent the execution of a workflow. If the input validation matches the regex pattern, the execution can be started, otherwise the execution of the workflow is prevented until the input value matches the regex pattern. The regex message can be customized for a better understanding of the values expected in Start Workflow form:
In order to test the regex, input a Test Value and click on . An Info window will open stating if the regex test passed or failed:
Visibility Expressions
The visibility expression determines if the parameter it is applied on, will be visible or not in Start Workflow form. If the expression will evaluate to True, then the parameter will be visible otherwise not. Type a visibility expression in the field. If help regarding the expression construction is needed you can click the ? button. Here are some helpful examples:
Test the expression’s syntactical correctness and the expression’s boolean evaluation by clicking the Test button.
NOTE: for the parameter types where the Hidden option is available, it is recommended that this option should not be checked while you are using a visibility expression.
If the expression is syntactically correct and evaluates to True, it will return the following message for the following expression:
In case the parameter's visibility depends on another parameter, the visibility expression should contain the sent value of the dependent parameter, for example:
- In case that a parameter's visibility depends on a parameter of type VMware Host Picker, it should be used an expression similar to the following (sent value is host ID, e.g. 'host-1'):
- In case that a parameter's visibility depends on a parameter of type CheckBox, it should be used an expression similar to the following (sent value is true/false corresponding to checked/unchecked):
The Save button from Visibility Expressions was removed because now the informations will be stored locally when leaving the input and saved in the Profile with Save and Close.
The Cancel button will not revert the profile as it was until now (because in the past, changes were saved in the database after each parameter). The Close button will close the Edit Parameters Page.
NOTE:
- For parameters with visibility expressions assigned to the same parameter group, if all parameter visibility expressions are evaluated to False (are invisible in Portal), the parameter group will also be invisible in Portal.
- In order to use a visibility expression for a parameter with a dependency on another parameter, it is not necessary to add the dependency to the parameter in the Parameter list