[Variable_Defined] returns True if a variable has been defined in the current page or False otherwise. Can be used to check if a variable has been defined even if the current value of the variable is Null or the empty string.
[Variable_Defined: 'Variable Name']
Use the [Variable_Defined] tag with the name of a variable. In the following example, True is returned if the variable Favorite_Color is defined.
[Variable_Defined: 'Favorite_Color']
True
Use the [Variable_Defined] tag to check whether a variable has been defined or not. If it has not then the variable can be set to a default value. In the following example, the variable Favorite_Color is set to Blue if it has not been defined.
[If: (Variable_Defined: 'Favorite_Color') == False]
[Variable: 'Favorite_Color'='Blue']
[/If]
Tag Link | [Variable_Defined] | Category | Variable |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 3.0 |
Output Type | Boolean | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0,LDML3x |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft