The QueryRecordMeetsFilterCriteria event has to be handled to get this behavior. A Hashtable is used to handle the values that are to be filtered at the top and bottom. The following sample displays the first 2 and last 2 records in a filter. The Hashtable is filled by using the user defined function, SetPositionFilter().
To perform a filter that restricts the filtered set to a certain number of elements, you have to filter twice. In the first pass, you get the total set of records that satisfies the filter. Then these records are numbered by using an unbound column populated indirectly with the SetPositionFilter method. Once the unbound column is populated with a position index value, you can then apply a second filter to select the first so-many or last so-many records.
Figure 1: Top and bottom 2 records value set as true on filtering first time
Figure 2: Top and bottom 2 values filtered on second time filtering applied to the same value
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|