$Web Parm Len: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→Syntax) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_Parm_Len}} | {{DISPLAYTITLE:$Web_Parm_Len}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Length of isindex or form field</span> | ||
Line 9: | Line 9: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%rc</span> = $Web_[Parm_]Len( <span class="term">fieldname, occurrence</span> ) | ||
< | </p> | ||
===Syntax terms=== | ===Syntax terms=== | ||
Line 16: | Line 16: | ||
<tr><th>fieldname</th> | <tr><th>fieldname</th> | ||
<td>The name of the isindex or form field, returned by <var>[[$Web_Name]]</var>. Required argument if <var class="term">occurrence</var> not specified, otherwise optional.</td></tr> | <td>The name of the isindex or form field, returned by <var>[[$Web_Name]]</var>. Required argument if <var class="term">occurrence</var> not specified, otherwise optional.</td></tr> | ||
<tr><th>occurrence</th> | <tr><th>occurrence</th> | ||
<td>The occurrence number of an isindex or form field, or the occurrence number of the isindex or form field matching <var class="term">fieldname</var>, if <var class="term">fieldname</var> is specified. Optional argument if <var class="term">fieldname</var> is specified, otherwise it is required. | <td>The occurrence number of an isindex or form field, or the occurrence number of the isindex or form field matching <var class="term">fieldname</var>, if <var class="term">fieldname</var> is specified. Optional argument if <var class="term">fieldname</var> is specified, otherwise it is required. |
Latest revision as of 22:03, 5 June 2013
Length of isindex or form field
$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.
$Web_Len takes two arguments and returns a number, or it returns zero if the field does not exist.
Syntax
%rc = $Web_[Parm_]Len( fieldname, occurrence )
Syntax terms
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. |
Usage notes
- $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, as well as simply to save typing.