$Web Selp Check: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
(No difference)
|
Revision as of 16:00, 15 June 2012
<section begin="desc" />Check parameters against a global select element<section end="desc" />
$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_x 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
<section begin="syntax" /> %RC = $Web_Selp_Check(global_name, param_name, - option_keywords) <section end="syntax" />
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. This is a required argument. |
---|---|
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. This a required argument. |
option_keywords |
A string of blank-separated keywords specifying special processing for this $function; it can contain any of the following: | |
CANCHECK | Cancel request if any value of param_name not found in select options list |
---|---|
NOCAN | Don't cancel request if global_name not found |
NOFORM | Don't look in form parameters |
NOISINDEX | Don't look in isindex parameters |
NOISI | Synonym for NOISINDEX |
This an optional argument.
Code | Meaning |
---|---|
0 | All values of param_name equal to some value in |
1 | Global_name not a saved global select element, and NOCAN option |
2 | Some value of param_name not equal to any value in |
Any other error results in cancellation of the User Language request. |
See $Web_Selp for an extended example which includes use of $Web_Selp_Check.