Table of Contents

Data Model Editor - Operators page

This page defines operators which can be used in conditions (such as 'is equal to', 'less than' and others).

List in the left part shows defined operations. Add or delete one by right-clicking the list and choosing appropriate topic from the pop up menu or using corresponding speed buttons on the top of the page. To edit an operation choose it from the list and modify its properties in the right part of the page.

Operator properties

{expr1} [[operator text]] {expr2}

Here {expr1} and {expr2} will be substituted by corresponding expression in condition (an entity attribute or constant).

The text in [[ ]] brackets will be shown as link for operator selection.

For “between” operator Display Format property will also contain 'and' word between second and third expression:

{expr1} [[is between]] {expr2} and {expr3}

Additionally you can use the following constructions:

Examples:

{expr1} = {expr2}
{expr1} LIKE {expr2}

You can define more complex operators even with sub-queries. For example here is an expression for “more then average” operator:

{expr1} > (SELECT AVG({expr2.field}) FROM {expr2.table})

Main operations

To add new operator use “Operators | Add operator” menu item. To delete - use “Operators | Delete selected”.

Operators menu also contains “Add/Update default operators” menu item which can be used to add the default operators in the model or update the parameters of existing one.

There are the following default operators:

ID Caption SQL expression
Equal is equal to {expr1} = {expr2}
NotEqual is not equal to {expr1} <> {expr2}
LessThan is less than {expr1} < {expr2}
LessOrEqual is less than or equal to {expr1} <= {expr2}
GreaterThan greater than {expr1} > {expr2}
GreaterOrEqual greater than or equal to {expr1} >= {expr2}
IsNull is null {expr1} is null
InList is in list {expr1} in ({expr2})
StartsWith starts with {expr1} like {expr2}
NotStartsWith does not start with not({expr1} like {expr2})
Contains contains {expr1} like {expr2}
NotContains does not contain not({expr1} like {expr2})
Between is between {expr1} between {expr2} and {expr3}
InSubQuery is in set {expr1} in ({expr2})
DateEqualSpecial is {expr1} = {expr2}
DateEqualPrecise is {expr1} = {expr2}
DateBeforeSpecial is before (special date) {expr1} < {expr2}
DateBeforePrecise is before (precise date) {expr1} < {expr2}
DateAfterSpecial is after (special date) {expr1} > {expr2}
DateAfterSpecial is after (precise date) {expr1} > {expr2}

“Special” and “Precise” operators with the same expressions differ by value editors. “Special” operators has “Custom List” value editor with “SpecDateValues” name. This list is filled at runtime by such values as Today, Yesterday, First day of month, etc.

The “Precise” operator has usual “Date/time value editor” which allows simply to enter necessary date (or select it using calendar).