LassoScript Utility
Basics Browse Detail


Tag Link [Return_Value] Category Custom Tag
Type Substitution Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type Any Security Tag
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0


[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].




Optional Parameters
Encoding Keyword Specifies the encoding for the tag's return value. Tags are encoded using -EncodeHTML by default if their value is output on a format file. No encoding is applied to nested tags unless an explicit encoding keyword is specified. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.


To define a tag that only returns values of a certain data type:

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)]