Adding a Global Parameter

Add a global parameter to a view model that requires input at runtime.

  1. In the View Model Parameters tab, click + (Add a new global parameter to the model). The Global Parameter Properties dialog opens.
  2. Fill in the fields as follows:
    Option Description
    Name A name for the parameter. Make sure it conforms to the variable naming conventions .
    Type Choose a type from the popup. Types are expressed in the SQL format, rather than as Java objects.
    Parameter in an array Check this if you want the parameter to be an array of the selected type.
    Description (Optional) Enter a description.
    Validation Expression (Optional) Enter a Boolean expression that will be evaluated to determine the validity of the value passed for this parameter. If the expression evaluates to false, the data service does not execute and returns an error message (see the description of the Validation Error Expression field for details). Refer to the value of the variable being validated by its fully qualified name: variables.global.<name> . For example, to ensure that the length of the State variable is two characters, you could use this expression: variables.global.State.length == 2

    If you leave the Validation Expression field blank, Sybase Data Federation performs no validation for this parameter.

    Validation Error Expression (Optional) Enter an expression that evaluates to an error message. The error message is returned whenever an invalid parameter value causes the validation expression to evaluate to false. Enclose any strings in double quotes. Refer to the value of the variable being validated by its fully qualified name: variables.global.<name> . For example, for a variable called State, you might enter
    "Please enter a 2-letter state code for the " +
        "variable \'State.\' You entered: " +
        variables.global.State
    

    If you leave the Validation Error Expression field blank, Data Federation uses a generic error message.

  3. Click OK to create the parameter.
Related concepts
Global View Model Parameters
Related tasks
Displaying Global Parameters
Modifying a Global Parameter
Reordering Global Parameters
Deleting a Global Parameter
Mapping Input Source Parameters to Global Parameters
Related reference
Properties Dialog Field Descriptions

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.