XBASE Expression Builder
General Information
This utility helps you build XBASE
expressions with a "pick and choose" menu for functions, fields,
and variables. An expression can be as simple as a field name or as
complex as a calculation involving immediate IF functions,
concatenations, and data type conversions. The main purpose of the
Expression Builder is to facilitate the creation of expressions by
providing you with lists of appropriate options each step of the
way.
How to Use the Screen
To create an expression, you can type
it directly into the expression box, or you can select items from
the functions drop-down lists in the dialog box to have the utility
paste them into the expression box for you.
You might find some of the following
functions useful when manipulating strings in expressions.
|
If
you want to...
|
then use this function
|
|
Remove leading &
trailing blanks from character expressions
|
ALLTRIM( )
|
|
Remove leading
blanks
|
LTRIM( )
|
|
Remove trailing
blanks
|
RTRIM( )
|
|
Add specified
characters to the left, right, both sides of a string
|
PADL( ), PADR( ),
PADC( )
|
|
Work with parts of a
character string for comparisons
|
SUBSTR( )
|
|
Use a specified
number of characters starting left of a string
|
LEFT( )
|
|
Use a specified
number of characters starting right of a string
|
RIGHT( )
|
|
Change uppercase to
lowercase, or lowercase to uppercase
|
UPPER( ), LOWER(
)
|
|
Convert a string to
initial capitals
|
PROPER( )
|
|
Have a numeric field
interpreted as a character string
|
STR( )
|
Functions
Contains list boxes of four function
types. When you select a function from one of the four types, it is
automatically pasted into the expression box. When you are building
expressions for remote views, only the functions specific to the
target back-end data are listed.
String - Lists available character
string functions.
Logical - Lists available logical
functions.
Math - Lists available math
functions.
Date - Lists available date and time
functions.
Expression
Displays the expression that you are
creating or editing.
Fields
Lists the fields in the current table
or view.
To paste a field into the expression
box, either double-click the field or select the field and press
ENTER.
To display fields from a different
table, select a different table in the From Table box.
From
Table
Lists tables and views that are open.
Select a table or view to update the Fields box.
Variables
Lists system memory variables, arrays,
and memory variables that you have created.
To paste a variable into the expression
box, either double-click the variable or select the variable and
press ENTER.
The
VERIFY Button
Validates the syntax of the expression
in the expression box. If the expression is valid, "Expression is
valid" is displayed in the status bar. If it is not valid, an error
message is displayed. This option is not enabled for remote
views.
Note If you include a user-defined
function call in the expression, Verify will indicate an error, but
there will not necessarily be an error when the expression is
evaluated at run time.
The
OPTIONS Button
Displays the Expression Builder
Options dialog box, in which you can set preferences for the
Expression Builder.
|