1 Reply Latest reply: May 15, 2014 9:57 AM by Steve Caiels RSS


    Mark C.

      I am trying to filter certain records from my database.  The unusual part is that I want the group of records 11 through 15 and then each 15th record from there.  For example:


      Record #s needed


      11  12  13  14  15

      26  27  28  29  30

      41  42  43  44  45

      56  57  58  59  60


      In short, there is a pattern in the data that groups 15 records together and then repeats.  I need the last five records in each group. 


      Does anybody have know how I can accomplish this?  I have tried numberous attempts with RECNO() function to no avail.  :confused:

        • RECORD FILTERING using RECNO()
          Steve Caiels



          You can use a filter expression of :


          mod(recno(),15)=11 .Or.

          mod(recno(),15)=12 .Or.

          mod(recno(),15)=13 .Or.

          mod(recno(),15)=14 .Or.



          This works fine for me, but I remember some time ago seeing a suggestion that you shouldn't filter directly on recno(), but should create a calculated field and filter on that.  So if you have a calc field expression called myrecord with an expression of recno(), then the filter would be


          mod(myrecords,15)=11 .Or.

          mod(myrecords,15)=12 .Or.

          mod(myrecords,15)=13 .Or.

          mod(myrecords,15)=14 .Or.





          Datawatch Europe Ltd