LassoScript Utility
Basics Browse Detail

@ Reference

Tag Link @ Reference Category Symbol
Type Symbol Source Available No
Support Preferred Version 6.0
Change Unchanged Data Source Any
Output Type Any Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0


The @ symbol allows a reference to data to be stored in a variable rather than a copy of the referenced data. The [Reference] tag is a synonym for reference.

Every variable in Lasso is a named reference to an object. The referenced object could be a string, integer, array, map, or any other data type. Usually, each object is only referenced by one variable.

It is sometimes desirable to point to the same object using two variables. The same object could be referenced by both a local and page variable. Or, an object could be stored in an array and simultaneously referenced by a page variable.

This is accomplished by storing a reference in a variable. [Variable: 'VariableOne' = @($VariableTwo)] stores a reference to VariableTwo in VariableOne. Now, both variables refer to the same object and changes made to one are reflected in the other.


[Variable: 'VariableReference' = @($VariableName)]

[Variable: 'MapReference' = @($MapName->(Find: 'Element Name'))]

[Variable: 'ArrayReference' = @($ArrayName->(Get: Array Index))]

[Local: 'LocalReference' = @($PageVariable)]

[Local: 'ParamReference' = @(Params->(Get: Array Index))]


No Parameters Required.


To reference the same data using two variables:

Use the @ symbol to create a reference to data in one variable in a second variable. If the value of either variable is changed, the same value will be returned by the other variable.

In the following example, a variable Company contains the words Blue World Communications. A second variable Business is set to a reference to the variable Company using @$Company. When the variable Business is then changed both variables report the new value.

[Variable: 'Company' = 'OmniPilot Software']
[Variable: 'Business' = @$Company]

[Output: $Company]

[Output: $Business]
[Variable: 'Business' = 'OmniPilot']

[Output: $Company]

[Output: $Business]

OmniPilot Software

OmniPilot Software