$FlsChk: Difference between revisions
(Automatically generated page update) |
m (misc cleanup) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<p>The $ | <p> | ||
The <var>$FlsChk</var> function, combined with the <var>[[$FlsAcc]]</var> function, allows a request to check for field-level security access violations before they occur. <var>$FlsChk</var> 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. </p> | |||
<p>The format of the $ | |||
<p class=" | ==Syntax== | ||
<p> | |||
The format of the <var>$FlsChk</var> function is:</p> | |||
<p class="syntax">$Flschk (<span class="term">fieldname</span>, <span class="term">access</span> [, <span class="term">filename</span>]) | |||
</p> | </p> | ||
<ul> | <ul> | ||
<li>fieldname is a character string representing the name of the field whose access is to be checked. | <li><var class="term">fieldname</var> is a character string representing the name of the field whose access is to be checked. | ||
<p>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 $ | <p>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 <var>$FlsChk</var> can be costly system overhead since all field descriptions must be examined.</p> | ||
</li> | </li> | ||
<li>access is the desired access or set of accesses; the argument can include: | |||
<ul> | |||
<li><var>S</var> (SELECT)</li> | |||
<li><var>R</var> (READ)</li> | |||
<li><var>U</var> (UPDATE)</li> | |||
<li><var>A</var> (ADD)</li> | |||
</ul> | </ul> | ||
<p>S | <p> | ||
< | If the access argument contains an invalid character (not <var>S</var>, <var>R</var>, <var>U</var>, or <var>A</var>), a warning message is issued and 0 is returned. If a set of accesses is specified, such as <code>SR</code>, a 1 is returned only if all accesses in the set are allowed for the indicated field or fields.</p> | ||
< | |||
< | |||
</li> | </li> | ||
<li><var class="term">filename</var> is optional and can be used to control the file or group context of the function. The format for the <var class="term">filename</var> argument is identical to the <var>[[$FlsAcc]]</var> <var class="term">name</var> argument. | |||
<p> | |||
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. </p> | |||
<p> | |||
If you want to access the current file of a <var>For</var> loop, use <var>[[$Curfile]]</var> as the third argument. </p> | |||
<p> | |||
If this argument is omitted or null, the context used for the check is the context of the statement containing the function. </p></li> | |||
</ul> | </ul> | ||
[[Category:SOUL $functions]] | [[Category:SOUL $functions]] |
Latest revision as of 16:04, 8 June 2015
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.
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 $FlsChk can be costly system overhead since all field descriptions must be examined.
- access is the desired access or set of accesses; the argument can include:
- 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 $FlsAcc name argument.
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 you want to access the current file of a For loop, use $Curfile 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.