I would be careful using a global variable for record level access because it may be possible for an unscrupulous user with knowledge and FM advanced to edit the value in the global.
I know, but the structure is multi-users/company
This temp workaround assign to the user the variable $$SESSION.IDCOMPANY to control privilege (but don't work).
In future, in my separation model i need to implement with ExecuteSQL control.
i don't understand if the problem is on the find function or security limitation. Question: what is the result if you use "View all record"?
P.S. are you italian?
the problem is on the Find function, is not security limitation.
Show all works properly and i saw <no access> on record when the calculation return false.
But when i perform a Find i don't get any records and the result is an error 401, but is not true (records exist in my table for the user that perform find).
P.S: Si, sono italiano
puoi inviarmi il dettaglio dello script che hai creato per effettuare la ricerca?
Set Error Capture [True]
Perform Find 
if you use debugger at the end you get error 401.
I don't understand if you use "View Find mode" or set of search criteria into the field (or fields) by Perform Find  function.
or using a Script
Set Perform Find
both method respond with error result 401.
If i don't set the condition on privilege setting (New, Edit and Delete are permitted), every find mode works properly.
coherentkris has a good point. A non-full-access user with FMPA and dataviewer can change a $$ variable so long as they know its name. Regardless of "multi-users/company", you can put that same value in a global variable, where it has all the benefits of a $$variable, but can't be set via the data viewer.
I don't know why it behaves this way, but I think it has for several versions back.
Switch to a comparison of a global field and it should work. I wish global variables worked.
Edit: I believe that the global variable method works when the file is local, but not when hosted. This can cause confusion when people are testing locally before sending to FMS.
as you all told me, i use global field for the view section of privilege and now it works!
But in my opinion is a strange behaviour because the Global Field and the Global Variable have the same behaviour for this circumstance.
Anyway this seem resolve my problems and yes, i'm in hosted environment.
But why using the Global Variable it works in edit and delete condition? Strange, no?