Adding a query

Queries are defined using the Queries node in the Mobile configuration. For each query you can also define multiple filters, parameters, and sort options. After you define a query, you can add it to one or more menus.

  1. Open the Mobile configuration in the Configuration Editor.
  2. Add a child Query node to the Queries node, or to one of its child Category nodes.
  3. Add these attributes to the new query node:
    ID
    Enter a unique identifier for the query. The ID will be used to reference the query when you add it to a menu.
    Model
    Enter the ID of the model that the query will use. The model defines the data structure for the query. The value must match the ID of a model defined under the Models node.
    Type
    Enter the type of query. You can enter one of these options:
    • SQL: The query will use an SQL statement to select records.
    • MapBrowser: The query will use Map Browser query defined in Infor Operations and Regulations GIS.
    SQL
    If you entered SQL for the Type attribute, enter the SQL statement here.

    You may need to specify different SQL statements for SQL Server and Oracle databases, due to differences in syntax between the two platforms. You can use the OracleSQL attribute to specify a different SQL statement for Oracle databases.

    You can also add tokens to your SQL for filters, sort options, and parameters.

    • Add a @FILTERS token at the location where you want to insert the filters defined for the query.
    • Add an @ORDERS token at the location where you want to insert the sort options defined for the query.
    • Add a token for each parameter that the query takes, such as @StreetName for a Street Name parameter.
    Reference ID
    If you entered MapBrowser for the Type attribute, you can use either the ID attribute or the Reference ID attribute to specify the name of the map query that you want to use.
  4. Save your changes.