Scripting > Get the value of a SOM expression to a StreamServe variable

Get the value of a SOM expression to a StreamServe variable
You can map the values from a SOM expression to a StreamServe variable.
This mapping makes it possible to use data from ADEP Designer. For example, to control post-processing or set driver options depending on input, template, form, layout or script data.
This mapping is one-way, i.e. you can get values from a SOM expression to a StreamServe variable, but not the other way around.
Mapping can be done once for each document, or once for each page:
The mapping is done first for the entire document, and then for each page in turn before it is output.
Note:
Example 6
SOM expression: $record.header.txtPONum.
StreamServe variable: $ponum
 
Example 7
Input data to the XFA processor:
<?xml version="1.0" encoding="UTF-8"?>
<batch>
<transaction>
 <header>
  <txtPONum>1234567890</txtPONum>
  <dtmDate>2004-02-08</dtmDate>
  <txtOrderedByCompanyName>Another Company</txtOrderedByCompanyName>
  <txtOrderedByAddress>123, Any St.</txtOrderedByAddress>
The variable mapping will assign the value of the txtPONum element to the $ponum StreamServe variable:
SOM Expression: $record.header.txtPONum
StreamServe variable: $ponum
 
Example 8
Relative SOM expressions for master page children should start from first level child of master page.
A master page, Page1, contains:
text field PageNumber
subform CustomerInfo with the fields CustomerName and CustomerID
Relative SOM expression for field PageNumber is "PageNumber".
Relative SOM expression for CustomerName is "CustomerInfo.CustomerName".
 
Example 9
Relative SOM expressions for main subform children should start from first level (page level) child of main subform.
A main subform Data can be referred to by using the absolute SOM expression "$form.Data".
The subform Data contains the child subform Part1, which contains the field Header1.
Relative SOM expression for Header1 is "Part1.Header1".
 
For information about the SOM expression syntax, see Adobe Digital Enterprise Platform Document Services – Designer 10.0 Scripting Basics.
OpenText StreamServe 5.6 Updated: 2013-03-01