Check groupmode correctly.
convert a couple of get_records to recordset - memory usage in attendance is nasty.