Integrate Software AG Products Using Digital Event Services : MashZone NextGen Help : Appendix : Legacy Presto components : Mashables and Mashups : Mashups in EMML : Writing Mashups in EMML : Declaring Mashup and Macro Variables and Parameters
Declaring Mashup and Macro Variables and Parameters
Mashups and macros have one output parameter to hold their result. You can also declare any number of input parameters to pass data to mashups or macros.
Note:  
Only one <output> declaration can occur in a mashup or macro. Validation for mashup scripts or macro libraries will not flag multiple <output> declarations as an error. You will, however, receive an error when compiling, debugging or publishing the mashup script.
You can also declare variables in mashups, macros or other control statements that allow nested EMML statements in order to work with data in the mashup or macro. For example, you can declare variables within <foreach>.
You must declare parameters explicitly. With variables, you can declare them explicitly or you can create variables implicitly by assigning a name to the outputvariable attribute for any statement. Explicitly declaring variables does make mashup scripts easier to understand and also makes content assistance available. Variables and parameters must be declared (explicitly or implicitly) before they are used in any other EMML statement.
Important:  
In previous versions of MashZone NextGen, variables and parameters were not required to be declared before they were used.
Variables and parameters all have a name, a datatype and optional subtype, data (a value) and a scope. They may also have a default value. Input and output parameters can also have a label, for use in user interfaces. For more information, see:
*Valid Names for Variables and Parameters
*Datatypes for Variables and Parameters
*Default and Constructed Values
*Variable and Parameter Scopes
*Referencing Parameters and Variables
*Wrapping Results or Variables in CDATA Sections
*Handling HTML Responses
*Handling JSON Responses or Inputs
*Working Samples
Copyright © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback