StreamServe scripts variables can be read directly from a script in the XFA processor. The XFA processor adds the variables to a data set named strs which can be accessed from both Java script and FormCalc scripts in the loaded XDP templatexfa.datasets.strs.variables.variableid.valueWhen a StreamServe Message is used as the data connection for a template (i.e. the setting Add the Message as a data connection in the Data view is enabled), the following syntax is also valid:$record.variables.variableid;
Example 11 $myvar = "myvalue";//Assigns "myvalue" to a StreamServe variable named "myvar"this.rawValue = xfa.datasets.strs.variables.myvar.value;//Assigns the value of the StreamServe variable "myvar" to the rawvalue of the current object.
Note: Read Only variables, such as those created by SAP (for example, RDI header variables) and Lawson agents, can not be read in this way. Such variable values must be assigned to scripting (Read/Write) variables before they can be read in the XFA processor.
The placement of the script and when the script is executed determines if you can use this method. The pageSet object and its descendants can safely be assigned to scripting variables only in the layout:ready event and the prePRint event.
OpenText StreamServe 5.6 | Updated: 2013-03-01 |