Add a condition to the database query.

When you press the Add or Edit button of section  Search criteria selection , we get the following dialog:

This dialog is used to define a search condition. In the upper section of the dialog is shown a field list that you can use for definining a condition. The fields shown are:

  • Owner : Table owner used in relational databases.
  • Table : Table name in the database.
  • Table alias : Table name used. Usually is the same as the table name.
  • Field / Formula : This is the field that will be read from the database or the formula typed in section Select fields from database.
  • Alias: This is the name of a formula or a name assigned to a particular field. This is the alias of the field on section Select fields from database.
  • Type: Field type or kind of data that is kept in the field. It can be one of the following: CharDate or Number. You have to use single quotes ' to enclose fields of Char or Date field, when you compare fields of these types agains values. With operator In list (in) you must enclose each value in single quotes as in: 'A','B','C'.

To create a new search condition, choose a field on the list, which the comparation will be made on and fill the following values:

  • Comparision operator: Aqui puede escribir el campo que se va a consultar o puede escribir una formula de la base de datos. De doble clic en la lista de campos para insertar el campo en este texto. En la imagen arriba se dió dobre clic sobre el campo customer.CUSTOMERNU, mientras que el resto del texto fue escrito. Puede utilizar cualquier formula válida de su base de datos, consulte la documentación correspondiente para mas información. Los criterios que se pueden utilizar son:
    • Equal(=): The column value must be equal to the comparation value.
    • Different (<>): The column value must be different to the comparation value.
    • Greater than (>): The column value must be greater than to the comparation value.
    • Less than (<): The column value must be less than to the comparation value.
    • Greater or equal (>=): The column value must be greater or equal to the comparation value.
    • Less or equal (<=): The column value must be less or equal to the comparation value.
    • Like (like): This operator only applies to data Char fields. You can specify a search pattern to bring all records that match it. You can specifiy a pattern march using the special characters % and _. % means 0 or more characters and _ means 1 character, so a% means everything that begins with and a and %xyz_ means everything that will end with xyz and another character. Usually you will use the following patterns:
      • something%: text that begins with the word something.
      • %something%: text that contains the word something.
      • %something: text that ends with  the word something.
    • In list (in): You can specify a list of comma separated values. For example 'A','B','C' .
    • Between (between): The database value must be between the values defining this value range. The range is inclusive and includes the values given here.
    • Is empty(is null): The field value must be empty or null.Igual (=): El valor del campo debe ser igual al valor que se especifica para cumplir la condición.
  • Value 1: This is the value used to compare the database field. If the data type field is Char or Date, you must use single quotes ' to enclose the field.
  • Value 2: If you choose the Between operator, this text is enabled to capture the second value in the range. If the data type field is Char or Date, you must use single quotes ' to enclose the field.
  • Prompts : If there are prompts defined in section User's prompt creation , you can use the answer as a value in the condition. This way the conditions turns into a dynamic condition whose value will be established when the query is executed. 

Click  OK  to create the condition and  Cancel to exit this dialog without creating it.