$Web_Parm
Jump to navigation
Jump to search
Value of isindex or form field
$Web_Parm retrieves the value of an isindex or form field in a request.
$Web_Parm takes four arguments and returns a string, or null for any error condition.
Syntax
%string = $Web_Parm( fieldname, occurrence, [start], [length] )
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. |
start | Starting position within the field. Optional argument which defaults to 1. |
length | Length to return. This is an optional argument, provided in case an isindex or form field exceeds 255 bytes. The length of an isindex or form field can be determined with $Web_Len. The default is the length of the isindex or form field. |
Usage notes
- $Web_Parm first looks for isindex fields matching the name, then for matching form fields. $Web_Parm can be used instead of $Web_IsIndex_Parm and $Web_Form_Parm to make it easy to switch between using "method=GET" and "method=POST"<form> tags and simply to save typing.
Examples
This example places the value of each isindex or form field in a URL into a User Language %variable of the same name.
* Stash the form values in matching fields. %CUSTOMER_NAME = $Web_Parm( 'CUSTOMER_NAME' ) %CUSTOMER_NUM = $Web_Parm( 'CUSTOMER_NUM' ) %ORDER_NUM = $Web_Parm( 'ORDER_NUM' ) %ORDER_DATE = $Web_Parm( 'ORDER_DATE' ) %ORDER_ITEM = $Web_Parm( 'ORDER_ITEM') %ORDER_ITEM2 = $Web_Parm( 'ORDER_ITEM', 2)