[Return_Value] can be used in a [PostCondition] tag to inspect the result that is being returned from a custom tag.
Since no code after a [Return] tag will be executed within a custom tag it cannot be used to inspect the return value from a custom tag except in a [PostCondition].
[Return_Value]
Use the [Return_Value] tag to fetch the data type of the return value in a [PostCondition] tag. The following example returns the first parameter to the tag and throws an error if that value is not an array.
[Define_Tag: 'ArrayOnly']
[PostCondition: (Return_Value)->Type == 'array']
[Return: (Params)->(Get: 1)]
[/Define_Tag]
Tag Link | [Return_Value] | Category | Custom Tag |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 5.0 |
Output Type | Any | Security | Tag |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
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