Object Oriented Filtering (OOF) - Dragan S. Pusonjic
Previous Table of Contents Next

Macro substitute                                                     
We had defined our object with its interior states for user’s manipulating. We already had mentioned that our object
reverses string value of filter which we marked with cxWhereCond. Show how to use this variable view in select
equation. For this purpose we will use macro substitute (&). Write our select equation again, where we will use macro
substitute with official word.
                SELECT * ;
                         FROM order ;
                         WHERE &cxWhereCond

At the moment of performing Select command there is developing of contents of increased value cxWhereCond.
By this treatment we connected select command with our object of filtration.

Sensibility of our filtering object                          
Now, we will explain one very important, just hidden characteristic of object’s filtration. It is especially important
in case when there is a great number of filtration’s objects on the screen. What is the matter about? When the
user on some way try to attack the object of filtration, we want to emphasize to user that it was happened some
change in the same object of filtration, that is – the object had a reaction at outside action.
We can use sensibility of object to work off any further action. Because, in object of filtration there is a method
named ‘xLightOffGrid’. It returns Null value.

 Filter with more table fields                                  
Let’s permit our user to set more complicated filter equation. For example: he wants to see all numbers
 of invoices in some wanted date range (>=23/05/1995, <= 28/06/1995) and to consider value_invoices >=2000.
Notice that already in our where filter equation there are two fields.
                SELECT  *;
                        FROM order;
                        WHERE;
                                BETWEEN(order_date ,23/05/1995 , 28/06/1995) .AND. ;
                                value_ invoice >= 2000

Here is written purposed filter equation with defined date range. In previously showed examples, we performed
variations of that field. As field presents invoice’s value of numerical type, this field could vary like date field.
For example:


                    SELECT * ;
                        FROM order ;
                        WHERE ;
                                    BETWEEN(order_date ,23/05/1995 , 28/06/1995) .AND. ;
                                    value_invoice <= 2000

        SELECT * ;
                        FROM order ;
                        WHERE ;
                                    BETWEEN(order_date ,23/05/1995 , 28/06/1995) .AND. ;
                                    BETWEEN(value_invoice, 2000,4000)

 All of these Where equation is a real problem. By the way, it must be observed that the same form has been used
to present wanted data from a table.
Following is the example which is to be solved by the outlines of vdf objects.
For instance:

SELECT * ;
                        FROM order ;
                        WHERE ;
                                    value_invoice >= 2000 .AND. ;
                                    BETWEEN(order_date ,23/05/1995 , 28/06/1995


Previous Table of Contents Next