Template:Function Description Box: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
|- valign="top"
|- valign="top"
! scope="row" style="background: #ecedf3; color: #111; border-style: solid; border-width: 2px 1px 0 2px; border-right: 1px solid #bbb;" width="100" | Description
! scope="row" style="background: #ecedf3; color: #111; border-style: solid; border-width: 2px 1px 0 2px; border-right: 1px solid #bbb;" width="100" | Description
| style="background: #f9f9f9; color: #111; border-style: solid; border-width: 2px 2px 0 0" width="1200" | <span style="font-family: monospace,monospace; font-size:1em; color:#0f3f8d; font-size:110%"><b>{{{1}}}(</b><i>{{{2}}}</i><b>)</b></span><noinclude>
| style="background: #f9f9f9; color: #111; border-style: solid; border-width: 2px 2px 0 0" width="1200" | <span style="font-family: monospace,monospace; font-size:1em; color:#0f3f8d; font-size:110%"><b>{{{name}}}(</b><i>{{{arguments}}}</i><b>)</b></span>
The [[#Field|Field()]] function returns the value stored in field <i>name</i>.
The format of return is selected by <i>mode</i>.

Available <i>mode</i> values:
<div style="margin-left: 20pt;"><table style="border-spacing:0px; border-collapse:collapse; background: #f9f9f9">
<tr><td style="text-align:left; padding-right:20pt"><b>0</b></td><td>Raw, unformatted data</td></tr>
<tr><td style="text-align:left; padding-right:20pt"><b>1</b></td><td>Formatted data</td></tr>
</table></div>

Argument <i>mode</i> is optional (defaults to 1).

|- valign="top"
! scope="row" style="background: #ecedf3; color: #111; border-style: solid; border-width: 0px 1px 2px 2px; border-top: 1px solid #bbb; border-right: 1px solid #bbb;" | Examples
|style="background: #f9f9f9; color: #111; border-style: solid; border-width: 0px 2px 2px 0; border-top: 1px solid #bbb;" | <span style="font-family: monospace,monospace; font-size:1em;"><b><nowiki>field(album)</nowiki></b></span>
<p style="margin-left:20pt;">Returns the formatted value of field <i>name</i> <span style="font-family: monospace,monospace; font-size:1em;">album</span>.
Note that this is equivalent to <span style="font-family: monospace,monospace; font-size:1em;">[album]</span>.</p>
<span style="font-family: monospace,monospace; font-size:1em;"><b><nowiki>field(date, 0)</nowiki></b></span>
<p style="margin-left:20pt;">Returns the raw, unformatted value stored in the <span style="font-family: monospace,monospace; font-size:1em;">date</span> field.
Note that this is equivalent to <span style="font-family: monospace,monospace; font-size:1em;">[date,0]</span>.</p>
|}
<div style="text-align:right;">([[#top|Back to top)]]</div>

<noinclude>
|}
|}



Revision as of 21:28, 23 January 2016

Description {{{name}}}({{{arguments}}})

The Field() function returns the value stored in field name. The format of return is selected by mode.

Available mode values:

0Raw, unformatted data
1Formatted data

Argument mode is optional (defaults to 1).

Examples field(album)

Returns the formatted value of field name album. Note that this is equivalent to [album].

field(date, 0)

Returns the raw, unformatted value stored in the date field. Note that this is equivalent to [date,0].

(Back to top)


|}

Function Description Box Template:

Typing {{Function Description Box|FUNCTION NAME|FUNCTION ARGUMENTS}} produces the message shown at the top.