If I use this simple rule:
If NOT(LoggedinUser.LoginName = MyObject.Code)
READ PROTECT MyObject FROM User
All the queries return all matching instances, 20 to a page, with just
enough contiguous pages to show all matching instances.
When I compound the condition:
If LoggedInUser.Type = 'XX' AND NOT(LoggedinUser.LoginName =
MyObject.Code)
READ PROTECT MyObject FROM User
Now the queries do show the same matches as the simple query but the matches are scattered among blank pages with one or more instances appearing on a page in the same order they are grouped in the object.
The result is the queries return 39 mostly blank pages (object contains 773 instances @ 20 per page = 39). The user has to serially visit each page to find/view the matching instances that are returned one or more per page depending how they were originally grouped in the data base. Does anyone know why this happens?