PARAM

The PARAM tag is used to define the requirements for parameter values. Parameters are used to pass variable values to the analytic so that the user can specify the appropriate values when they schedule or run the analytic. For example, you could use Start Date and End Date parameters to allow users to set a date range to limit the data the analytic is analyzing.

Syntax

//PARAM id type <OPTIONAL> <MULTI> <SEPARATOR value> <QUALIFIER value>  <VALUES value_listlabel
  <description>
id

The unique identifier for the parameter. Specifies the variable to assign the value(s) of the parameter to.

type

Specifies the types of parameters that can be entered. The following types can be specified using uppercase letters:

  • C – Fields based on Character data types can be selected.

  • N – Fields based on Numeric data types can be selected.

  • D – Fields based on the Date subtype of the Datetime data type can be selected.

  • DT – Fields based on the Datetime subtype of the Datetime data type can be selected.

  • T – Fields based on the Time subtype of the Datetime data type can be selected.

  • L – Fields based on the Logical data type can be selected.

OPTIONAL

Optional. Specifies that the parameter is optional and the user does not need to enter a value.

MULTI

Optional. Specifies that the parameter accepts multiple values. MULTI can be specified for the Character (C) and Numeric (N) data types, and the Date (D), Datetime (DT), and Time (T) subtypes of the Datetime data type. It is not supported for the Logical (L) data type.

SEPARATOR value

Optional. Only used when the type is ‘C’ and the MULTI option is specified. The SEPARATOR value specifies the character that will be used to separate the individual values in the parameter list when the analytic is processed. A commonly used separator, or delimiter, is the comma character. If no SEPARATOR value is specified a single space is used as the delimiter. The space character cannot be specified as a value for SEPARATOR in the command syntax, so if you want to use space as the separator you need to omit the SEPARATOR parameter.

QUALIFIER value

Optional. Only used when the type is ‘C’ and the MULTI option is specified. The QUALIFER value specifies the character that will be used to identify the start and end of the value when the analytic is processed. Any text enclosed within the qualifier characters is treated as text. Commonly used qualifiers are single quote characters. There is no default value for the qualifier, and you cannot use a space as the qualifier.

VALUES value_list

Optional. Specifies a list of one or more values the user can select from when they run the analytic. VALUES can be specified for the Character (C) and Numeric (N) data types, and the Date (D), Datetime (DT), and Time (T) subtypes of the Datetime data type. It is not supported for the Logical (L) data type. Use the following syntax to specify the values: VALUES |Value1|Value2|Value3|Value n|

Numeric, date, datetime, and time values must be specified using the following formats:

  • Numeric values can be positive or negative. They must be specified using decimal notation, and without a thousands separator. For example, 1500.00 or -1500.00

  • Date values must be specified using the format MM/DD/YYYY (for example, 12/31/2014)

  • Datetime values must be specified using the format MM/DD/YYYY hh:mm:ss (for example, 12/31/2014 23:59:59)

  • Time values must be specified using the format hh:mm:ss (for example, 23:59:59)

label

Specifies the UI label to associate with the parameter. The value is displayed in AX Client and AX Web Client when the user is prompted to enter a value for the parameter.

description

Optional. Descriptive text that specifies the purpose of the parameter. The description can be multiline, but it cannot skip lines. The value is displayed in AX Web Client and AX Client when the user is prompted to enter the parameter value. The description can prompt the user to enter the correct value. For example, “Enter the cutoff date for the payroll period”. The description must be entered on the next line after the associated PARAM tag.

Example

The following example shows parameter definitions for start date, end date, region, and the maximum number of transactions. The date values are optional, and more than one region can be specified. The maxTrans parameter presents users with the values they can choose from.

//PARAM start_date D OPTIONAL Start Date
  (Optional)Enter the start date for the analysis.
//PARAM end_date D OPTIONAL End Date
  (Optional) Enter the end date for the analysis.
//PARAM region C MULTI SEPARATOR , QUALIFIER ’ Region(s)
  Enter one or more regions to include in the analysis.
//PARAM maxTrans N VALUES |25|50|75|100| Maximum transactions
  Select the maximum number of transactions to process.


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback