$Web Selp Check: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (→Return codes) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_Selp_Check}} | {{DISPLAYTITLE:$Web_Selp_Check}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Check parameters against a global select element</span> | ||
<var>$Web_Selp_Check</var> validates that each value of a form and/or isindex parameter matches one of the options of a global select element. An overview of the <var>$Web_Sel_xxx</var> functions is provided in <var>[[$Web_Selp]]</var>. | <var>$Web_Selp_Check</var> validates that each value of a form and/or isindex parameter matches one of the options of a global select element. An overview of the <var>$Web_Sel_xxx</var> functions is provided in <var>[[$Web_Selp]]</var>. | ||
Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%rc</span> = <span class="literal">$Web_Selp_Check</span>(<span class="term">global_name</span>, <span class="term">param_name</span>, [<span class="term">option_keywords</span>]) | ||
< | </p> | ||
===Syntax terms=== | ===Syntax terms=== | ||
Line 42: | Line 42: | ||
<tr><th>Code</th> | <tr><th>Code</th> | ||
<th>Meaning</th></tr> | <th>Meaning</th></tr> | ||
<tr>< | |||
<td>'''All''' values of | <tr><td>0</td> | ||
global select element | <td>'''All''' values of <var class="term">param_name</var> equal to some value in | ||
<tr>< | global select element <var class="term">global_name</var>. </td></tr> | ||
<td>''Global_name'' not a saved global select element, and NOCAN option | |||
<tr><td>1</td> | |||
<td>''Global_name'' not a saved global select element, and <var>NOCAN</var> option | |||
specified.</td></tr> | specified.</td></tr> | ||
<tr>< | |||
<td>'''Some''' value of | <tr><td>2</td> | ||
global select element | <td>'''Some''' value of <var class="term">param_name</var> not equal to any value in | ||
global select element <var class="term">global_name</var>, and <var>CANCHECK</var> option not specified.</td></tr> | |||
<tr><th></th> | <tr><th></th> | ||
<td>Any other error results in cancellation of the <var class="product">User Language</var> request.</td></tr> | <td>Any other error results in cancellation of the <var class="product">User Language</var> request.</td></tr> |
Latest revision as of 17:12, 16 April 2013
Check parameters against a global select element
$Web_Selp_Check validates that each value of a form and/or isindex parameter matches one of the options of a global select element. An overview of the $Web_Sel_xxx functions is provided in $Web_Selp.
$Web_Selp_Check takes three arguments and returns a numeric result code; for some types of errors, the current User Language request is cancelled.
Syntax
%rc = $Web_Selp_Check(global_name, param_name, [option_keywords])
Syntax terms
global_name | The name of the global select element containing the values to check against. The global select element with this name must have been created by $Web_Save_Sel. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
param_name | The name of a form and/or an index parameter in the current web request. For each occurrence of this parameter, its value is checked to see if it is equal to one of the values in the options list. | ||||||||||
option_keywords | An optional argument that is a string of blank-separated keywords specifying special processing for this $function; it can contain any of the following:
|
Return codes
Code | Meaning |
---|---|
0 | All values of param_name equal to some value in global select element global_name. |
1 | Global_name not a saved global select element, and NOCAN option specified. |
2 | Some value of param_name not equal to any value in global select element global_name, and CANCHECK option not specified. |
Any other error results in cancellation of the User Language request. |
Examples
See $Web_Selp for an extended example which includes use of $Web_Selp_Check.