Tag Link | [Else] | Category | Conditional |
---|---|---|---|
Type | Process | Source Available | No |
Support | Preferred | Version | 2.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | Internal | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x, Lasso 2.5, Lasso 2.0, Lasso 1.x |
Valid only within [If] ... [/If] container tags. [Else] executes the remainder of the container tag only if the expression in the [Else] tag returns True or no expression is specified.
[If: Conditional Expression]
...
[Else: Conditional Expression]
...
[Else]
... Default ...
[/If]
Optional Parameters | |
---|---|
Conditional Expression | The conditional expression to be evaluated. If True this portion of the conditional will be executed. Defaults to True if no conditional expression is specified. |
The [Else] tag now accepts an optional conditional expression so that it functions in place of the deprecated [Else:If] tag. The [Else] tag behaves like the [Else] tag in earlier versions of Lasso if no conditional expression is specified.
To show a message if a field is empty:
Use the [If] ... [/If] container tag with an [Else] tag. The [If] tag contains a conditional expression to check whether the field value for First_Name contains any data. If it does then the field value is shown with a label, otherwise a message is displayed that the field does not contain data.
[If: (Field: 'First_Name') != ' ']
<br>First Name: [Field: 'First_Name']
[Else]
<br>No First Name Specified.
[/If]
<br>No First Name Specified.
Substitution | ||
---|---|---|
|
|
|
Container | ||
|
|
|
Process | ||
|
|