Point of clarification: You want a button in each row so that clicking that row's button swaps that record for the first record in the list of found records?
And the record number field is just a number field?
It's a fairly straight forward script:
Set Variable [$Rec ; Value: table::record number]
Set Field [ Table::Record Number ; GetNthRecord (table::Record Number ; 1 )]
Go To Record [first]
Set Field [Table::Record Number ; $Rec]
Sort[Restore; No Dialog]