Discussions

Expand all | Collapse all

Limited the number of records shown in a report with a button.

  • 1.  Limited the number of records shown in a report with a button.

    Posted 04-30-2019 12:15
    I have a table that has 10,000 records of data. I have two roles, premium and trial. I want the trial users to be able to search, filter, sort etc on 10,000 records worth of data but the number of records that they would see should be limited to 15.

    For eg, assume I have 10,000 records in my table with only one field: "Number". The numbers range from 1-10000. As a trial user, assuming the default report is set to sort from low to high, I should be able to see records 1-15 only. If I sort from high to low, I should be able to see 9985-10000 only. Also, there should be a button at the bottom of the report that says 'Show more'



     


  • 2.  RE: Limited the number of records shown in a report with a button.

    Posted 04-30-2019 12:24
    My suggestion is to use the REM function on the Record ID# to allow that Role to see only records where the REM([Record ID#],15) = 0,

    ie if the Record ID# is evenly divisible by 


  • 3.  RE: Limited the number of records shown in a report with a button.

    Posted 04-30-2019 12:36
    Thanks. What if I want the user to be able to filter/sort and be able to see fresh records each time?


  • 4.  RE: Limited the number of records shown in a report with a button.

    Posted 04-30-2019 12:41
    Not tested but can probably use the now() function to grab the minutes portion of the current time, so for example.  Unfortunately there is not an easy way to get at seconds.

    var number Divisor = ToNumber(Left(ToText(Now()),2))

    IF(Rem([Record ID#], $Divisor)=0,true)


  • 5.  RE: Limited the number of records shown in a report with a button.

    Posted 04-30-2019 12:46
    Thanks. I'll try it out. Where does this code go?


  • 6.  RE: Limited the number of records shown in a report with a button.

    Posted 04-30-2019 12:48
    You can call that formula checkbox field 

    [Trial User allowed to see?]

     and it will be on your table with the 10,000 records.
    and then have a Custom Role Permissions Rule that the users in the Role

    Trial Users

    can View records where that field is checked.