$Web IsIndex Parm Line: Difference between revisions
(Created page with "{{DISPLAYTITLE:$Web_IsIndex_Parm_Line}} <span class="pageSubtitle"><section begin="desc" />Value of isindex field line<section end="desc" /></span> $Web_IsIndex_Parm_Line retr...") |
m (→Syntax) |
||
(20 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_IsIndex_Parm_Line}} | {{DISPLAYTITLE:$Web_IsIndex_Parm_Line}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Value of isindex field line</span> | ||
$Web_IsIndex_Parm_Line retrieves the value of a specific line in an isindex field. It is especially useful for ''textarea'' input fields. $Web_IsIndex_Line is a synonym for $Web_IsIndex_Parm_Line. | <var>$Web_IsIndex_Parm_Line</var> retrieves the value of a specific line in an isindex field. It is especially useful for ''textarea'' input fields. <var>$Web_IsIndex_Line</var> is a synonym for <var>$Web_IsIndex_Parm_Line</var>. | ||
Since isindex fields are more commonly called "URL parameters," you can use another synonym for this $function, <var>[[$Web_URL_Parm_Line]]</var>. | |||
<var>$Web_IsIndex_Parm_Line</var> takes three arguments and returns a string, or null for any error condition. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%string</span> = $Web_IsIndex_[Parm_]Line( <span class="term">fieldname, occurrence, line_num</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. 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. Optional argument if fieldname is specified, otherwise it is required.</td></tr> | ||
Line 23: | Line 24: | ||
</td></tr></table> | </td></tr></table> | ||
==Usage notes== | |||
<ul> | |||
<li>A line is considered to be a block of text that is terminated by either an ASCII carriage return (X'0D') or a carriage return followed by a line feed (X'0A'). This is what is ordinarily sent by a browser to mark the end of each line of a textarea input field. | |||
<li>For a discussion of isindex requests and data, see [[Janus Web Server application coding considerations#URL parameters or isindex data|"URL parameters or isindex data"]]. | |||
</ul> | |||
==Examples== | |||
This example places each line of a textarea isindex field into an occurrence of a multiply occurring field. | This example places each line of a textarea isindex field into an occurrence of a multiply occurring field. | ||
<p class="code"> | <p class="code">FOR 1 RECORD IN ORDER_RECORD | ||
%NLINES = $Web_IsIndex_Num_Line('COMMENTS') | |||
FOR %I FROM 1 TO %NLINES | |||
%COMMENT = $Web_IsIndex_Line('COMMENTS' , , %I) | |||
ADD COMMENT = %COMMENT | |||
END FOR | |||
END FOR | |||
</p> | </p> | ||
==See also== | |||
See also | |||
<ul> | <ul> | ||
<li>[[$Web_IsIndex_Parm_Len]] | <li><var>[[$Web_IsIndex_Parm_Len]]</var> | ||
<li>[[$Web_IsIndex_Name]] | <li><var>[[$Web_IsIndex_Name]]</var> | ||
<li>[[$Web_IsIndex_Parm]] | <li><var>[[$Web_IsIndex_Parm]]</var> | ||
<li>[[$Web_Num_IsIndex]] | <li><var>[[$Web_Num_IsIndex]]</var> | ||
<li>[[$Web_IsIndex_Parm_Num_Line]] | <li><var>[[$Web_IsIndex_Parm_Num_Line]]</var> | ||
</ul> | </ul> | ||
[[Category:Janus Web Server $functions|$Web_IsIndex_Parm_Line]] | [[Category:Janus Web Server $functions|$Web_IsIndex_Parm_Line]] |
Latest revision as of 22:23, 5 June 2013
Value of isindex field line
$Web_IsIndex_Parm_Line retrieves the value of a specific line in an isindex field. It is especially useful for textarea input fields. $Web_IsIndex_Line is a synonym for $Web_IsIndex_Parm_Line.
Since isindex fields are more commonly called "URL parameters," you can use another synonym for this $function, $Web_URL_Parm_Line. $Web_IsIndex_Parm_Line takes three arguments and returns a string, or null for any error condition.
Syntax
%string = $Web_IsIndex_[Parm_]Line( fieldname, occurrence, line_num)
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. Optional argument if fieldname is specified, otherwise it is required. |
line_num | Line number in the isindex field for which data is to be returned. This is an optional argument and defaults to 1. |
Usage notes
- A line is considered to be a block of text that is terminated by either an ASCII carriage return (X'0D') or a carriage return followed by a line feed (X'0A'). This is what is ordinarily sent by a browser to mark the end of each line of a textarea input field.
- For a discussion of isindex requests and data, see "URL parameters or isindex data".
Examples
This example places each line of a textarea isindex field into an occurrence of a multiply occurring field.
FOR 1 RECORD IN ORDER_RECORD %NLINES = $Web_IsIndex_Num_Line('COMMENTS') FOR %I FROM 1 TO %NLINES %COMMENT = $Web_IsIndex_Line('COMMENTS' , , %I) ADD COMMENT = %COMMENT END FOR END FOR