Simply perform a find. This can be in a script. Any found set produced by performing a find will automatically omit << No Access >> records. This leaves "show all records" and "Show omitted only" as the only means by which a user can pull up a set of records that includes no access records. If you have FileMaker Advanced, you can install a custom menu set that prevents even those two options from pulling up "no access" records.
This works, except if users want the ability to do finds on their OWN records. If so, then presumably they will need access to show all/omitted to get back to a view of ALL of just their own records. So you would need to prevent access to the native show all/omitted and write your own scripts for those which are really just a version of the original Find again.
Rather than re-creating the privilege requirements in the scripts, you could just have the "show all" script do a find on a field that should always have a value in it, like maybe searching the primary key field for *.
For show omitted, you could also follow the intended step with a constrain find that, again, just searches for a known value.
The benefit is that you don't end up writing your privileges twice. In both cases, you're really just adding one generic step.
Yes, I think we're on the same page. Didn't mean to imply a need to re-create privilege requirements in scripts. Just pointing out that the Show All / Modified scripts must be modified as you suggest, since you would need to remove the native Show All/Omitted.
And Lock the toolBar closed as well.
Was more worried that the OP might not have caught that. It's one of those scenarios where you can work pretty hard before you realize you don't have to.
Man, if I could get back all the time I wasted years ago checking for if month >= 12...
Hey here's a FM behavior that is almost certainly something I'm doing wrong but don't know what:
The FIND * method above works great with my privilege set rules when working on the local client, but when the file is served, ALL FINDS return NO RESULTS. And so neither does FIND *.
[Full Access] works fine when the file is served, and when I log in with my other privilege set, native SHOW ALL RECORDS returns my viewable records as well as all the <no access> records. But performing ANY FIND, with ANY criteria (not just *) returns error 401.
Why would my privilege set work as expected locally, but not allow FINDS when served?
I am serving the file from FMPHost.com to test it. FM Pro 14. Mac OS 10.11.3
Actually, I think I found my answer here: Limiting Access On A Record-By-Record Basis
I was using a $$VARIABLE. Switching to a GLOBAL FIELD instead and see if that solves it... (shoulda done that anyway for security reasons)
YUP! That was the problem! THANKS FM COMMUNITY!
So much to LEARN!
Yes you can get either a <No Access> or a ?. I find the easiest way to make that go away is with a Conditional Format; Value = <No Access> and font size 99. What happens is FileMaker recognizes the No Access and resizes the field value too big to display, hence hides the field.