Scripting in StreamServe > StreamServe scripting language specifics > Field references

Field references
If you only need to retrieve the value of a field in a script, you do not have to create a field variable. In this case you can use a field reference (&<field name>).
Examples
Example 11
if(&countryCode = "USA")
{
$overlay = "USA.lxf";
}
 
& prefix
Field references must begin with &:
&<field name>
Used in scripts only
You can only use field references in scripts, and not in the Design Center formatting tools.
Case sensitive
Field references are case sensitive. For example, if the field name in the Event is countryCode, the field reference must be &countryCode and not &Countrycode.
 
In StoryTeller, you can not use a &<fieldname> reference. To retrieve the value of a field reference, use the StEvalXPath function.
For example, $value = StEvalXpath("fieldname");
OpenText StreamServe 5.6 Updated: 2013-03-01