invert records

I have a relation class_to_class_student (from class table to class_student table).

I have done a search on a field as

forms.classDetail.class_to_class_student.student_name = ‘%’;

I have got 45 records in the foundset. The total records in the table is 100.

Then I have another statement run as

forms.classDetail.controller.invertRecords();

But no records displayed instead of showing the other 55 records.

Any idea please?