$FlsChk: Difference between revisions
(Automatically generated page update) |
|
(No difference)
|
Revision as of 17:46, 21 July 2014
The $FLSCHK function, combined with the $FLSACC function, allows a request to check for field-level security access violations before they occur. $FLSCHK is designed for use with the IF statement and can determine whether a given set of field-level security accesses is valid for a specified field or for all fields in a file or group. The function returns a 1 if the specified set of accesses is valid.
Syntax
The format of the $FLSCHK function is:
$FLSCHK (fieldname, access [,filename])
- fieldname is a character string representing the name of the field whose access is to be checked.
- access is the desired access or set of accesses; the argument can include:
If the field name is omitted or null, every field in the file or group is checked; the function returns a 1 only if the access is allowed for every field in the file or group. This use of $FLSHCK can be costly system overhead since all field descriptions must be examined.
S (SELECT)
R (READ)
U (UPDATE)
A (ADD)
If the access argument contains an invalid character (not S, R, U, or A), a warning message is issued and 0 is returned. If a set of accesses is specified, such as SR, a 1 is returned only if all accesses in the set are allowed for the indicated field or fields.
- filename is optional and can be used to control the file or group context of the function. The format for the filename argument is identical to the name argument described earlier for the $FLSACC function. For single file context, the field level security access rights are well defined. In group context, this function returns a 1 if the indicated access would compile without error. If access for the current file of a FOR loop is desired, $CURFILE can be used as the third argument. If this argument is omitted or null, the context used for the check is the context of the statement containing the function.