ui.Dialog.getQueryFromField

Returns the SQL condition of a field used in a query by example dialog.

Syntax

getQueryFromField(
   field-name STRING )
  RETURNING sql-condition STRING
  1. field-name is the name of the form field.

Usage

The getQueryFromField() method generates the SQL condition from the value entered in the field specified by the field-name parameter.

This method is used in the context of a construct dynamic dialog.

The result of this method can be used to build the WHERE part of a SELECT statement to find rows in a database.

Collect and concatenate field conditions returned from getQueryFromField(), then add AND or OR boolean operators to create an executable SQL query.
Note: The SQL condition is generated according to the current type of database. The SQL syntax may vary according to the target database. Therefore you should not reuse the generated SQL conditions. However, the user input of a query by example dialog can be reused for different type of databases (see ui.Dialog.setFieldValue and ui.Dialog.getFieldValue)