What Is It?
The Advanced filter is used to give you dynamic selection criteria to add more flexibility to the selection screen. This advanced filter should only be used by users who are familiar with valid programming selection statements.
This feature gives users with an advanced level of knowledge about the roomMaster database to do some extra "slick" selection criteria. If you have any specific questions about field names, check the bottom left hand corner of the screen when your cursor is on a field for the field name.
How It Works...
The entire expression must evaluate as true for a record to be included in the process. The expression may contain any valid roomMaster logical expression. The expression is evaluated at runtime for each record and can only contain field names that are in the main file.
Conditional Operators
= | Equals |
< | Less than |
> | Greater than |
Boolean Operators
NOT | Boolean (logical) NOT |
~ | Tilde (logical NOT) |
AND | Boolean AND |
OR | Boolean OR |
XO | Boolean XOR (eXclusive OR) |
Combined operators
<> | Not equal |
~= | Not equal |
<= | Less than or equal to |
=< | Less than or equal to |
~> | Not greater than |
>= | Greater than or equal to |
=> | Greater than or equal to |
~< | Not less than |
Check Boxes
| 1 | TRUE (Checked) |
| 2 | FALSE (Not Checked) |
Functions
sub(field,start,length)
age(beginning date, ending date)
inrange(field,low,high)
Example of a selection expression:
RES:DEPOSITAMT < 0 (reservations with a deposit) RES:STATE = 'FL' and RES:DEPOSITAMT < 0 (reservations with a deposit in Florida) JOU:DEBIT => 100.00 and JOU:DEBIT =< 200.34 (journal entries between 100.00 and 200.34) RES:ENTEREDBY = 'KLS' and RES:STATUS = 'R' (reservations made by KLS that are reserved status) RES:PHONE1 <> ' ' or RES:PHONE2 <> ' ' (reservations that have phone numbers) RES:RATE_REQ <> 'RACK' and RES:CHECKIN = CON:CURDATE (all reservations for today that are not RACK rate) RES:OVERRATE=1 (all reservations who have a rate override) RES:ENTRYDATE = TODAY() (all reservations entered today) RES:CXLDATE = TODAY() (all reservations cancelled today) SUB(RES:PHONE1,1,3)='619' (everything in the 619 area code) AGE(RES:CHECKIN,TODAY()) > 30 (all reservations coming in more than 30 days from today) INRANGE(JOU:DEBIT,10,20) (all journal entries where debit amount is between $10 and $20)
Dates are a little different:
Date's must be entered as DATE(MM,DD,yyYY) format.
RES:CHECKIN = TODAY() (reservations checking in with today's computer date) RES:CHECKIN = CON:CURDATE (reservations checking in with today's audit date) RES:CHECKIN = DATE(11,12,97) (reservations checking in on 11/12/97) RES:CHECKIN = DATE(11,12,2001) (reservations checking in on 11/12/01)
Putting all this together, we want everyone who has a deposit from Florida who is coming in on Christmas: (It is important to note that deposits are always a negative number since it is a credit, that is why we say < 0 instead of > 0)
RES:CHECKIN = DATE(12,25,97) and RES:STATE='FL' and RES:DEPOSITAMT < 0
If You Enter a Filter and You Get an Error
If you get an error on your statement (EVALUATE ERROR), you should first check that you are using VALID field names. Only use fields from files that are valid for what you are doing.
- Use HOH fields if you have an advanced filter for purging
- Use RES fields if you have an advanced filter for reservation reports
- Use JOU fields if you have an advanced filter for displaying or printing the journal
- You can always use TODAY() for today's date or CON:CURDATE for today's audit date
- Make sure numbers don't have single quotes and fields with alpha characters have single quotes
- Make sure you use AND, OR, and XOR in the right place
To find out what field name to use, you'll notice we put the field name on the bottom left corner of all the windows and forms. Example, if you open up a reservation and place your cursor on the lastname field, you'll see in the bottom left hand corner of your screen the text "RES:LASTNAME".
Advanced Filter and Report Wizard (Quick Reports)
When the Advanced Filter is applied to a browse screen and the Quick Report feature is used to print a report, only the data included after the Advanced Filter was applied will be included in the report.
Comments
0 comments
Article is closed for comments.