Adding Clauses to a Query

  1. From the main console, go to Select > My Queries.
  2. Either click New Query or for and select a query from the list.
  3. From the Queries Edit form, select the property to query from the Property list on the left.
  4. Using the Which dropdown list , select the operator.

    Note: These values will change depending on the datatype of the property. For example, if the property is associated with a list, that list will be displayed below the value textbox to allow for easy selection.

  5. In the Value, field enter the value for the property.
  6. (Optional) To make the property changeable, check the Changeable checkbox. A changeable property is one that can be changed each time the query is run. For example, to query for contacts by first and last names, create a contact query in which the first and last names are changeable. For more information, see the Parameters Form section.
  7. (Optional) Substitution values can be used in the query clauses. These values are used instead of literal values, and will get evaluated when the query is executed against the database. For example, adding a clause "Case Owner = MyLoginName" to a case query will return cases where the current user is the current case owner.

    Note: The Substitution values can be changed by editing the ce/fcQueryVariables.js file. This file is used for both the Queries Edit form and the Queries Results page to define what values are available and how they get replaced when the queries are executed.

  8. To add the clause to the query list, select Add. Repeat this process to add more clauses to the query. To place a new clause in a specific sequence among the existing ones, select an existing clause before attempting steps 3 through 7. When the Add button is clicked, the new clause will be added after the selected one. If no existing clause is selected, the new one will be added at the end of the list.

    Note: When a new clause or operator is added it may cause an error message to appear at the bottom of the form. This message will inform the user what other action is required for the query to be syntactically correct. If no message is present, the query is correct and can be used.

See Also

Queries Edit Form

Saving a Query

Modifying Query Clauses

Deleting a Clause

Setting How the Query Results are Returned

Queries Edit Form Screenshot

Next

Saving a Query

Adding Clauses to a Query