4D v13.4Query by formula |
||
|
4D v13.4
Query by formula
Query by formula
Use the Query by Formula editor to find records based on the results of a calculation or data manipulation. You use the Formula editor to write the expression based on which the query will be performed. The expression you write must equal either TRUE or FALSE for each record. You can use any function in the language as well as any project methods specifically designated by the developer. The Query by Formula command is useful for writing queries that involve operations such as the following:
Here are some examples of the uses of the Query by Formula editor:
However, the formula: [Stats]Annual Sales/[Stats]CostOfLiving is incorrect because it returns a numeric value, not TRUE or FALSE. You can only write formulas that are one logical line long. That is, you cannot press the Carriage return key on the keyboard and write a second line. The editing area, however, will wrap to the next line if the statement is too long. If you need to use a formula that is more than one line, write it as a project method and use this method in the formula. You can save formulas to disk and load saved formulas into the Formula editor. The following figure shows a query (search) formula in the Formula editor: For a detailed description of the Formula editor, see Formula editor. To use the Query by Formula editor:
|
PROPERTIES
Product: 4D |