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

  • 1
  • 1
  • Question
  • Updated 3 months ago
  • In Progress
  • (Edited)
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'



 
Photo of Sushrut Gaikwad

Sushrut Gaikwad

  • 112 Points 100 badge 2x thumb

Posted 3 months ago

  • 1
  • 1
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 
Photo of Sushrut Gaikwad

Sushrut Gaikwad

  • 112 Points 100 badge 2x thumb
Thanks. What if I want the user to be able to filter/sort and be able to see fresh records each time?
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)
Photo of Sushrut Gaikwad

Sushrut Gaikwad

  • 112 Points 100 badge 2x thumb
Thanks. I'll try it out. Where does this code go?
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.