GetNthRecords ( fieldname ; start ; num ; result )
Case ( num <= 0 ; Replace ( result ; 1 ; 1 ; "" ) ;
GetNthRecords ( fieldname ; start - 1 ; num - 1 ; result & ¶ & Evaluate ( "GetNthRecord(" & fieldname & ";" & start & ")" ) )
call this with result = "" like
GetNthRecords ( "table::id" ; Count ( table::id ) ; 30 ; "" )
If you don't like '?' in result, need some check for out of range.
ExecuteSQL can do this. Specifying OFFSET and FETCH FIRST using the ExecuteSQL function | FileMaker
For the first or last you might ORDER ASC or DESC with a FIRST FETCH. Getting things in the middle will require you knowing the amount to offset. This will return a return delimited list of values that can go directly into a variable, but operates independent of found sets so it might not work well for you.
If you are not familiar with SQL in FM then user19752 has a pretty good solution already and it is a little easier.
If you need to ORDER, SQL will be too slow with many records. But I forgot FMSQL doesn't need ORDER to FETCH.
I also forgot to write the function is used with X self join relation. Then, Count() can be Get(TotalRecordCount).