From m204wiki
Revision as of 15:07, 8 June 2015 by JAL (talk | contribs) (typos)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $FlsAcc function, combined with the $FlsChk function, allows a SOUL request to check for field-level security access violations before they occur. This reduces evaluation-time errors and request cancellations, and it helps to ensure that the files being updated are not left in a logically inconsistent state (Resolution of field types and levels).

$FlsAcc can determine a user's access rights to a particular field or to all fields in a file or group. The function returns a character string representing the user's access rights to the specified field(s). If the field is not defined in the file or group, a null string is returned. The string normally contains a combination of the characters listed in this table:

Character Meaning
S SELECT access rights
R READ access rights
U UPDATE access rights
A ADD access rights


The format of the $FlsAcc function is:

$Flsacc (fieldname [,name])


  • fieldname is a character string that is interpreted as the name of the field whose access is being checked.

    If this argument is omitted or null, every field in the file or group specified in the name argument is checked. In this case, the output string returned by $FlsAcc contains an access indication (S, R, U, A) only if that level of access applies to every field in the file or group. This use of $FlsAcc is costly system overhead because all field descriptions must be examined.

  • name is optional; use it to control the file or group context of the function. The format for this argument is:

    [[FILE | [PERM | TEMP] GROUP] name [AT location] | $CURFILE | $UPDATE]

    If access for the current file of a FOR loop is desired, $Curfile can be used as the second argument. $Update can be used to indicate the name of the update file in the current group. $Curfile and $Update are described in detail in $Curfile and $Update functions. For single file context, the field level security access rights are well defined. If a field name is specified in group context, $FlsAcc returns the maximum access rights for the group. If the name argument is omitted or null, the context used for the check is the context of the statement that contains the function.