There are not many ways to store and retrieve state between searches. One idea is to use an auxiliary lookup file. Let's call it displayed.csv.
| inputlookup mylookup
| lookup displayed.csv no OUTPUT rollno AS displayed
| where isnull(displayed)
| sort no
| head 1
| outputlookup append=true displayed.csv
Lookup displayed.csv must be set up before hand, to the destination outputlookup will write into.