How the query builder widget works


The query builder widget takes a query widget ID, or GUID, as input to render the query builder widget in a view field. This GUID is used to look up field information for the query builder widget from the AR System Query Widget form.

The query builder widget uses the Run Process action to initialize and generate its output in user readable format. For information on the Run Process action, see Running-external-processes-with-the-Run-Process-action.

The query builder widget uses the following system forms:

  • AR System Query Widget
  • AR System Query Fields
  • AR System Query Info

You can use the AR System Query Widget form to define unique query information to be displayed in a query widget. You can create a record with the GUID in the AR System Query Widget form, and then add fields to be displayed in the query widget list. End users can use the query builder widget with any form to build simple queries.

Using the query builder widget

The query builder widget allows you to use words instead of symbols to build expressions in a non-technical manner. It also presents only the appropriate data types and operators from which you can select. For example, instead of entering, "Create Date < 01/01/2011", you can enter "Create Date less than 01/01/2011."

Query builder widget example

QBW_expression.gif

A query builder widget appears in a form only if it is loaded into the form by the AR System server Administrator.

To build a query

  1. Open a form in which you want to perform a search.
    The query builder widget appears when the form opens. If it does not, click the appropriate button (for example, for advanced search) to open a query builder widget.
  2. Build a query to add to the table:
    1. In the left box of the query builder widget, select a field from the list of fields which can be queried upon. This list of fields is provided for this form by the query builder widget.

      All field types are available for the query builder widget except for currency and status history.

    2. In the center box, enter an operator using the list, which provides operators that are meaningful for the selected field.
      Following are the numeric and enumerated data type operators:
      • Is equal to—(for numeric and enumerated data types) Selects records in which the value in the chosen field matches exactly the value entered in the query.
      • Is not equal to—Selects records in which the value in the chosen field does not match the value entered in the query.
      • Is greater than—Selects records in which the value in the chosen field is greater than the value entered in the query.
      • Is greater than or equal to—Selects records in which the value in the chosen field is greater than or matches exactly the value entered in the query.
      • Is less than—Selects records in which the value in the chosen field is less than the value entered in the query.
      • Is less than or equal to—Selects records in which the value in the chosen field is less than or matches exactly the value entered in the query.
      • Is empty—Selects records in which the chosen field is empty
      • Is not empty—Selects records in which the chosen field contains some data

        Following are the date/time data type operators:
      • On—See Is equal to.
      • Not on—See Is not equal to.
      • Before—See Is less than.
      • After—See Is greater than.
      • On or Before—See Is less than or equal to.
      • On or After—See Is greater than or equal to.
      • Is empty
      • Is not empty

        Following are all other data type operators:
      • Contains—Finds entries that contain xx.
      • Starts with—Matches all entries that begin with xx.
      • Ends with—Matches all entries that end with xx.
    3. In the right box, type the value for which to search.
      For example, to find all current users with Create Date values that are less than 01/01/2011, you could use the query builder widget to construct the following queries:
      QBW_expression.gif
  3. Refresh the table.
    The table is refreshed based on the query created in the query builder widget.
  4. Click the plus sign to the right of fields to add a new set of input fields, then repeat steps 2 through 3 for each query you want to add to the table.
  5. In the Match field, select All or Any to display the results that match all queries or any query.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*