About Query Parameters

Some system queries may need parameters to execute. Each system query has its parameters predefined in the Define Query Parameters dialog box and will prompt for values for the current execution.

The Define Query Parameters dialog box is used as follows:

  1. When running a query that has parameters by design from the Queries window and from the Groups window.

  2. When running an Action Rule that runs queries with parameters without mapping parameters.

  3. When adding a Schedule that includes groups where the assigned query has parameters. And when editing a schedule if you need to redefine parameter values.

Parameters are defined in the Query Parameters step in the New or Edit Query wizards. You can also create, edit, or delete parameters in custom queries. Parameters are used in the custom query text in the following format:

:parameter_name:

You cannot open or view query parameters for core queries that are shipped with Eagle.

Available Parameter Types

Available parameter types include:

  1. Boolean. 

  2. Date. This parameter has the options of Absolute or Relative. Default value is "Send time as is":
    - Absolute can be used if you need the same date for each query run.
    - Relevant can be used if you need to use the date/time macros such as CD (Current Date).
    - Default value for Absolute Date is the value that can be chosen using the Date/Time picker.
    - Default value for Relevant Date is always the current moment when you press the Run query button.
    - "Send time as is" means that the value will be used as defined, without correction based on the user's local time. If it is false, the time will be corrected to the database time zone.

  3. Decimal.

  4. List. Provides the ability to select one or more values from the list. The Selection Mode option is used to define if only one value can be selected from the list or multiple values. All items in the list are predefined in this parameter type. Note that there is no validation for empty values, or duplicates, by design.

  5. Query. Provides the ability to select one or more values from the list. The Selection Mode option is used to define if only one value can be selected from the list or multiple values. The difference from the List type parameter is that the values in the list are not defined strictly here, but selected from the database as query results. Other query parameters can be used in this parameter type. Query parameter relationships allow you to use different type parameters inside the Query type parameter. For example, in the Query Parameters step, you can edit one parameter to be related to another parameter that will be defined as query results based on your input for the first parameter. The result will be displayed in the Define Query Parameter dialog box as a list of values.

  6. String.

Sample Parameters

Parameters can be entered as follows:

  • User entered single parameter. Enter an integer or a character string.

  • Date value. Specify the requested date via the Eagle date selector.

  • Selection list. Select one or more entries from the check boxes.

Sample Single Parameter

The following is a sample user entered single parameter.

Define Query Parameters dialog box

Sample Date Value Parameter

The following is a sample date value parameter.

Sample Date Value parameter

Sample Selection List Parameter

The following is a sample selection list parameter.

Sample Selection List parameter

With selection lists, you may check one, several, or all check boxes from the list.