57.2.2 Query Store: Command: Query by Formula
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.
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:
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 431.
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.
To enter a Formula click on the Formula Button. The following page will display:
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.
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.
|