Help

Table Of Contents
Protecting databases
F
ILEMAKER PRO HELP 467
Entering a formula for limiting access on a record-by-record basis
To allow or prohibit record viewing, editing, and deleting privileges to certain records within a table,
you need to specify a
Boolean calculation that determines whether the privilege is permitted. For
each record in the database, access is allowed when the calculation evaluates to True or to a non-
zero result, and access is prohibited when the calculation evaluates to False or zero. Here are two
examples:
To limit access to only those records created by the current account: Define a text field
named
Record_Created_By, and set the auto-enter option for the field to automatically
enter the account name when the record is created. (See
Defining automatic data entry.)
Then use the following calculation when defining custom record access privileges:
Record_Created_By = Get(AccountName)
The user will only have Browse access to records for which the above calculation evaluates as
True.
To limit access to only those records created on the current date: Define a date field named
Record_creation_date, and set the auto-enter option for the field to automatically enter
the creation date when the record is created. (See
Defining automatic data entry.) Then use
the following calculation when defining custom record access privileges:
Record_creation_date = Get(CurrentDate)
The user will only have Browse access to records for which the above calculation evaluates as
True.
Tip If you specify a calculation to prohibit viewing of certain records within a table, in most cases
you should use the same calculation to prohibit editing and deleting of the same types of records.
Otherwise, you may inadvertently allow users to edit or delete records that they cannot view.
Notes
The Boolean calculation that determines record access privileges can have unexpected
results, particularly if it is based on a user-editable field. For example, it’s possible for a user
with access privileges for only certain records to inadvertently deny themselves access to a
record after editing it. The user could make a change to a record’s content that changes the
result of the Boolean record access calculation so that it evaluates to False; then that user
Summary fields and
calculated fields
The results displayed in summary fields as well as calculated fields which
summarize over multiple records will exclude data from records for which
view privileges have been prohibited.
Find/Replace,
Replace
Contents,
and spelling checking
A user can only change data using these features in:
records that have edit privileges.
fields that are modifiable.
Scripts You can set an option for a script to run with full access privileges, which
permits a script to perform operations that a user with limited privileges would
not usually be able to do. If you don’t enable this option, any script steps that
attempt to access or change restricted data will fail. See
Creating and editing
scripts.
Apple events Data access privileges can affect the ability of a user to get, set, and delete
data using Apple events. Some Apple event commands may fail if the user
does not have appropriate access privileges.
Feature Effect of limiting data access