Assigning Criteria for Database Queries
After you've chosen the fields to query, you want to limit the search to the range of data you want to display. The Criteria tab contains parameters you can use to further define the query.
There are several ways to limit a database query:
-
Use an index to limit the query search to a pre-defined set of fields. This method results in the fastest query, because the DME call skips fields that are not specified in the index. You can type in a key value for any of the fields in the index to further define the query.
Indexes are part of the database definition. You cannot use the Infor Lawson Add-ins to add, change, or delete an index.
-
Use a condition to limit the query to a certain range of data. Available conditions for the fields you chose display in the Conditions list. For example, the CURRENT YEAR condition limits the query to data for this year only. Select a condition from the list to apply it to the query.
Conditions are part of the database definition. You cannot use the Infor Lawson Add-ins to add, change, or delete a condition.
-
Use the Maximum Primary Records to Return and the Maximum OTM Values to Return options to control the number of values your query returns.
Table Settings
Index | Select an index to base the query on. The associated key fields appear in the Index Key column. |
Key Values |
Specify values for the index keys to limit the query to the data that has those values. To add multiple key field values, separate values with a semicolon. To select a range of values, separate values with ->. Note: When you add key values for more than
one key field, do not skip lines. The query only reads consecutive
key values. If you skip a line, any key values that you enter after
the blank line are not recognized by the system.
|
Conditions | Select a condition to further limit the data that is searched. |
Clear Index and Condition |
If you select this button, all index key values and conditions you specified are cleared. Note that this button does not remove conditions from the Condition list. Conditions are part of the database definition. You cannot use the Infor Lawson Add-ins to add, change, or delete conditions. |
Maximum Primary Records to Return |
Set a maximum number of primary records to return.
Note: When you set the Maximum Primary Records to Return values
to a high number, your queries run more slowly because they are processing
more data and a paging call is being implemented.
The Add-ins application restricts database table queries to a maximum of 65,520 records to allow for headers, a title, and subtotals. Exceeding this limit may mean that some lines do not return or data may be lost. |
Maximum OTM Values to Return |
In the Maximum OTM Values to Return field, set the number of one-to-many relationship values you want to return. The maximum value is 600. Note that when you set the OTM values to a high number, your queries run more slowly because they are processing more data. Note:
|