TeleMagic
for Windows Filter Expressions
!EMPTY(contact1.status)
The exclamation point stands for the word "not". So, use this
expression in a filter to see only the records where the contact1.status
field is not empty. Remove the exclamation point to see records
where that field is empty.
contact1.datefield=DATE()
Use this expression in a filter to find records that have today's
date in the field contact1.datefield.
contact1.datefield>=DATE()-30
AND contact1.datefield<=DATE()
Use this expression to filter on a date range, where the field
contact1.datefield contains a date that falls within the last
30 days.
CTOD(SUBSTR(contact1.tmstart,1,10))>=CTOD('03/01/1997')
AND
CTOD(SUBSTR(contact1.tmstart,1,10))<=CTOD('04/01/1997')
Use this expression to filter on a specific date range, where
the date is in a character field such as the tmstart field. To
filter on the tmlastrev field, change the field name to tmlastrev
and the 1,10 to 3,10 in both places.
CTOD(SUBSTR(contact1.tmstart,1,10))>=DATE()-14
AND CTOD(SUBSTR(contact1.tmstart,1,10))<=DATE()AND
('TST'$UPPER(contact1.tmstart))
Use this expression to filter on a date range of the two weeks
prior to today's date, where the date is in a character field.
This expression also has the addition of the user ID on the end,
to pull up just the records that were created in the last two
weeks by the user TST. Remember that to filter on the tmlastrev
field, you'll need to change the field name to tmlastrev and the
1,10 to 3,10 in both places.
SUBSTR(DTOC(contact1.birthdate),1,5)=SUBSTR(DTOC(DATE(
)),1,5)
Use this expression in a filter to find people celebrating a birthday
today. This expression assumes that contact1.birthdate is a date
field.
SUBSTR(DTOC(contact1.birthdate),1,5)>SUBSTR(DTOC(DATE(
)),1,5) AND SUBSTR(DTOC(contact1.birthdate),1,5)<=SUBSTR(DTOC(DATE(
)+30),1,5)
Use this expression in a filter to find people celebrating a birthday
in the next 30 days.
SUBSTR(contact1.rcl,1,8)=
DTOS(DATE())
Because of the way information is stored in the RCL field, you
cannot use the .TODAY function to filter on that field. Instead,
use this expression in a filter to find records with today's date
in the RCL field.
CTOD(SUBSTR(contact1.rcl,5,2)+'-'+SUBSTR(contact1.rcl,7,2)
+'-'+SUBSTR(contact1.rcl,1,4))>=DATE()-30 AND
CTOD(SUBSTR(contact1.rcl,5,2)+'-'+SUBSTR(contact1.rcl,7,2)
+'-'+SUBSTR(contact1.rcl,1,4))<=DATE()
This expression is also used exclusively with the RCL field. Use
it to filter on a date range, where the RCL field contains a date
that falls within the last 30 days.
CTOD(SUBSTR(contact1.lv1memo,1,10))>=DATE()-7
This expression filters out records that have had additions to
the memo field for a specific date range. This filter will only
work if the notepad is stamped with the date using either "Add
Note" or "alt+N". It also assumes that the user is displaying
century. If they are not, you should change the SUBSTR(contact1.lv1memo,1,10)
to SUBSTR(contact1.lv1memo,1,8).
In
this document all FoxPro functions are displayed in upper case,
and field names in lower case. This is to make them easier to
read-expressions are not actually case-sensitive.
For more advanced expressions, there are several excellent FoxPro
and dBase reference guides available at your local computer or
bookstore.
--
End of FAQ #488