$Web IsIndex Parm: Difference between revisions
mNo edit summary |
m (→Syntax) |
||
(18 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_IsIndex_Parm}} | {{DISPLAYTITLE:$Web_IsIndex_Parm}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Value of isindex field</span> | ||
<var>$Web_IsIndex_Parm</var> retrieves the value of an isindex field in a URL. | |||
Since isindex fields are more commonly called "URL parameters," you may want to use the synonym for this $function, <var>[[$Web_URL_Parm]]</var>. | |||
$Web_IsIndex_Parm | <var>$Web_IsIndex_Parm</var> takes four arguments and returns a string, or null for any error condition. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%string</span> = <span class="literal">$Web_IsIndex_Parm</span>( <span class="term">fieldname</span>, <span class="term">occurrence</span>, [<span class="term">start</span>], [<span class="term">length</span>] ) | ||
</p> | |||
< | |||
===Syntax terms=== | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>fieldname</th> | <tr><th>fieldname</th> | ||
<td>The name of the isindex field, returned by $Web_IsIndex_Name. Required argument if occurrence not specified, otherwise optional.</td></tr> | <td>The name of the isindex field, returned by <var>[[$Web_IsIndex_Name]]</var>. Required argument if occurrence not specified, otherwise optional.</td></tr> | ||
<tr><th>occurrence</th> | <tr><th>occurrence</th> | ||
<td>The occurrence number of an isindex field, or the occurrence number of the isindex field matching ''fieldname'', if ''fieldname'' is specified. This is an optional argument if ''fieldname'' is specified; otherwise it is required.</td></tr> | <td>The occurrence number of an isindex field, or the occurrence number of the isindex field matching ''fieldname'', if ''fieldname'' is specified. This is an optional argument if ''fieldname'' is specified; otherwise it is required.</td></tr> | ||
Line 22: | Line 21: | ||
<td>Starting position within the field. This is an optional argument which defaults to 1.</td></tr> | <td>Starting position within the field. This is an optional argument which defaults to 1.</td></tr> | ||
<tr><th>length</th> | <tr><th>length</th> | ||
<td>Length to return. This is an optional argument, provided in case an isindex field exceeds 255 bytes. The length of an isindex field can be determined with $Web_IsIndex_Len. The default is the length of the isindex field. | <td>Length to return. This is an optional argument, provided in case an isindex field exceeds 255 bytes. The length of an isindex field can be determined with <var>$Web_IsIndex_Len</var>. The default is the length of the isindex field. | ||
</td></tr></table> | </td></tr></table> | ||
This example places the value of each isindex field in a URL into a User Language %variable of the same name. | ==Examples== | ||
<p class="code"> | This example places the value of each isindex field in a URL into a <var class="product">User Language</var> %variable of the same name. | ||
<p class="code">*Stash the form values in matching fields. | |||
%CUST_NAME = $Web_IsIndex_Parm('CUST_NAME' ) | |||
%CUST_NUM = $Web_IsIndex_Parm('CUST_NUM' ) | |||
%ORDER_NUM = $Web_IsIndex_Parm('ORDER_NUM' ) | |||
%ORDER_DATE = $Web_IsIndex_Parm('ORDER_DATE' ) | |||
%ORDER_ITEM = $Web_IsIndex_Parm('ORDER_ITEM') | |||
%ORDER_ITEM2 = $Web_IsIndex_Parm('ORDER_ITEM', 2) | |||
</p> | </p> | ||
Latest revision as of 02:33, 16 April 2013
Value of isindex field
$Web_IsIndex_Parm retrieves the value of an isindex field in a URL.
Since isindex fields are more commonly called "URL parameters," you may want to use the synonym for this $function, $Web_URL_Parm.
$Web_IsIndex_Parm takes four arguments and returns a string, or null for any error condition.
Syntax
%string = $Web_IsIndex_Parm( fieldname, occurrence, [start], [length] )
Syntax terms
fieldname | The name of the isindex field, returned by $Web_IsIndex_Name. Required argument if occurrence not specified, otherwise optional. |
---|---|
occurrence | The occurrence number of an isindex field, or the occurrence number of the isindex field matching fieldname, if fieldname is specified. This is an optional argument if fieldname is specified; otherwise it is required. |
start | Starting position within the field. This is an optional argument which defaults to 1. |
length | Length to return. This is an optional argument, provided in case an isindex field exceeds 255 bytes. The length of an isindex field can be determined with $Web_IsIndex_Len. The default is the length of the isindex field. |
Examples
This example places the value of each isindex field in a URL into a User Language %variable of the same name.
*Stash the form values in matching fields. %CUST_NAME = $Web_IsIndex_Parm('CUST_NAME' ) %CUST_NUM = $Web_IsIndex_Parm('CUST_NUM' ) %ORDER_NUM = $Web_IsIndex_Parm('ORDER_NUM' ) %ORDER_DATE = $Web_IsIndex_Parm('ORDER_DATE' ) %ORDER_ITEM = $Web_IsIndex_Parm('ORDER_ITEM') %ORDER_ITEM2 = $Web_IsIndex_Parm('ORDER_ITEM', 2)