$Web_Sel_Check

From m204wiki
Revision as of 21:33, 21 February 2011 by 198.242.244.47 (talk) (Created page with "{{DISPLAYTITLE:$Web_Sel_Check}} <span class="pageSubtitle"><section begin="desc" />Check string against a global select element<section end="desc" /></span> $Web_Sel_Check val...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<section begin="desc" />Check string against a global select element<section end="desc" />


$Web_Sel_Check validates that a string matches one of the options of a global select element. An overview of the $WEB_SEL_x functions is provided in $Web_Selp.

$Web_Sel_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_Sel_Check(global_name, selected_value, - 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.
selected_value A string which 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. Any of the following is valid:
CANCHECK Cancel request if selected_value not found in select options list
NOCAN Don't cancel request if global select element global_name not found


This an optional argument.

global select element global_name. specified. global select element global_name, and CANCHECK option not specified.
Code Meaning
0 Selected_value equal to one of the values in
1 Global_name not a saved global select element, and NOCAN option
2 Selected_value not equal to any of the values in
Any other error results in cancellation of the User Language request.

$WEB_SEL_CHECK return codes


The following statement will cancel the User Language request if the string 'DAY6' is not one of the values of the global select element 'DAYS.ESPERANTO':

%RC = $Web_Sel_Check('DAYS.ESPERANTO', - 'DN6', 'CANCHECK')


See $Web_Selp for an extended example using other $WEB_SELx functions.