Restrict Records in Layout - easier way 
Author Message
 Restrict Records in Layout - easier way


> I am using FP 5.0.  I would like to restrict users (30 all together) to
> specific layouts with record information limited.

> So far I have done the following:
> 1) Created a unique layout for each user (30 Layouts)
> 2) Password protected each layout (30 passwords-there names) so only one
> unique user can go to "their" layout

> Problem:
> 3) How do I keep each user from seeing everyone else's record.  If they go
> to their layout it shows all records but I want to restrict (show) only
> records that has their name in the record (name field)?

I've thought of an easier way to accomplish what I set out in my other
First create a Group for everybody as described in my other post.
Create a number field with a automatic entry (data) of 1 (You would have
to Replace this field with 1 for all current records because the 1 will
only be automatically put in in new records.)
Now another calc =
Now you have a field which always contains 1, and another field which
only contains 1 when the Group equals the Name field.
Now create a script which, as well as going to the correct layout etc,
would include the steps

 Enter Find Mode
  Set Field   [   calc  , 1 ]
  Perform Find

In the Edit Preferences/Document, you can set this as the opening
script, and it will automatically find only the records for the current
Group person.
Even if you make the password something odd, you can still keep the
Group as the person's name so that it will match the Name field.

This is a less obvious way of limiting access.

The only problem is that when you log in as Self, because you have total
access to everything, your group will be all groups, and therefore won't
equal any one group. The result is that you will get a message that no
records match this find, but when you click Cancel, you will be ok, and
will have access to all records.  

Or to avoid this happening, create a calc field =
and include a script step which will see if there is more than one group
(which means that the password is the overall password, because everyone
else belongs to only one group).

If   [ PatternCount(groupcalc;"?")=1 ]
    Show All Records
    Enter Find Mode
    Set Field     [     calc    , 1 ]
    Set Error Capture     [ Off ]
    Perform Find
  End If

If there is a paragraph mark in the calc for Groups field, it means
there is more than one group in it.

Maire Black

Mon, 18 Aug 2003 20:44:39 GMT
 [ 1 post ] 

 Relevant Pages 

1. Restrict Records in Layout

2. Ways to restrict accesses hostwise?

3. Efficient ways of updating a huge no of Records

4. Restrict deleting the Master records

5. Restricting records

6. Restrict users by records

7. Restricting Database Access by Record

8. restrict the set of record return

9. Restricting Database Access by Record

10. Restricting the number of records.

11. Restricting # of records returned by report

12. Restrict the number of records

Powered by phpBB® Forum Software