$Web Parm Len: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$Web_Parm_Len}} <span class="pageSubtitle"><section begin="desc" />Length of isindex or form field<section end="desc" /></span> $Web_Len retrieves the length of...")
 
m (1 revision)
(No difference)

Revision as of 21:38, 21 February 2011

<section begin="desc" />Length of isindex or form field<section end="desc" />


$Web_Len retrieves the length of an isindex or form field in a request. $Web_Parm_Len is a somewhat more syntactically correct synonym for $Web_Len.

Syntax

<section begin="syntax" /> %RC = $WEB_[PARM_]LEN( fieldname, occurrence ) <section end="syntax" />


$Web_Len takes two arguments and returns a number, or zero if the field does not exist.

fieldname The name of the isindex or form field, returned by $Web_Name. Required argument if occurrence not specified, otherwise optional.
occurrence The occurrence number of an isindex or form field, or the occurrence number of the isindex or form field matching 'fieldname', if fieldname is specified. Optional argument if fieldname is specified, otherwise it is required.


$Web_Len first looks for isindex fields matching the name, then for matching form fields. $Web_Len can be used instead of $Web_IsIndex_Len and $Web_Form_Len to make it easy to switch between using "method=GET" and "method=POST"<form> tags and simply to save typing.

See also: