logo


58.2.2 Query Store: Command: Query by Formula


Action of the command

This command allows you to Query using a Formula. If the formula evaluates to TRUE then the record being considered is included in the Set returned.

This will be rarely used:

a It is slow. In fact it excruciatingly slow. Avoid it at all costs!

b It is easy to make errors in the formula definition

After selecting Query by Formula from the drop down menu or after clicking on a Query by Formula line in the Query Display pane, you will see the Query by Formula editor controls:

 

Query: Command: Query by Formula: Controls

Return set for the Table

This drop down list allows you to specify which Table should be used to return a Set of records after the Query by Formula has completed.

Take Care: If this is set to the wrong Table then you will get unexpected results.

We have found that the most common reason for failed Queries is because of inattention to this list.

E Button to Edit the Name of a Set

This button is described in “Query Store: E Button to edit Set Names” on page 445.

Cross Relational Query

You can return a Set of records for the Table specified in Return set for the Table based on the value of a field that is related to this Table. This will be discussed later.

Formula Area

To enter a Formula click on the Formula Button. The following page will display:

 

Query: Command: Query by Formula: Formula page

General Considerations

Any result of any formula must evaluate to a True / False (Boolean). A formula may reference any fields from a related table - but see Cross Relational warning above.

Creation of a Formula

This area consists of several items:

Single Character Buttons - Displayed at the top of the page. These remind you of the Operators and Special Symbols that you can use in a Formula. Just Click the Buttons to automatically add or insert the character in to the Formula Text.

Fields area - Select the Field you require and then click Move Field Button to enter the selected field into the Formula area.



Harrowex Pty Ltd
http://www.hxmedical.com
Voice:+ 61 4 27 344 279
Fax: +61 3 52 439 019
static@hxmedical.com