Grouping Functions: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
(Created page with "{{function type page}} The expression language is largely used to evaluate one file at a time. The grammar implies that something like {{monospace|Field(Artist)}} should...")
 
Line 5: Line 5:
Grouping Functions may only be used in relevant areas (most notably Categories and the [[Tag Action Window]]) where Media Center displays groups of files, and not to individual file listings (such as an expression column in a File Details View).
Grouping Functions may only be used in relevant areas (most notably Categories and the [[Tag Action Window]]) where Media Center displays groups of files, and not to individual file listings (such as an expression column in a File Details View).


=== <span id="NAME">NAME(&hellip;)</span> ===
=== <span id="GroupCount">GroupCount(&hellip;)</span> ===
: Counts the members of a specified group (in a category or field).
: SUMMARY


{{function description box
{{function description box
| name=NAME
| name=GroupCount
| arguments=ARGUMENTS
| arguments=field
| description=
| description=
GroupCount() can be used to count the members of a group of files.
DESCRIPTION

{{argument optional|field|current grouping}}
| examples=
| examples=
'''{{monospace|EXAMPLE1}}'''
'''Example Threads:'''
: [http://yabb.jriver.com/interact/index.php?topic=81766.msg564453#msg564453 Matt introduces Grouping Functions]
: EXAMPLETEXT
: [http://yabb.jriver.com/interact/index.php?topic=94848.msg663421#msg663421 Use field names, not field values (square bracket notation)]
'''{{monospace|EXAMPLE2}}'''
: EXAMPLETEXT
'''{{monospace|EXAMPLE3}}'''
: EXAMPLETEXT
'''{{monospace|EXAMPLE4}}'''
: EXAMPLETEXT
}}
}}


=== <span id="GroupCount">GroupCount(&hellip;)</span> ===
<pre>
: Counts the members of a specified group (in a category or field).
To insert a table of arguments in the DESCRIPTION, use:

{{subst:argument table preset}}
{{function description box
</pre>
| name=GroupSummary
| arguments=field
| description=
Smartly summarizes the members of a specified group (mode, mean, min, max, etc as is most logical for that grouping).

{{argument optional|field|current grouping}}
| examples=
'''Example Threads:'''
: [http://yabb.jriver.com/interact/index.php?topic=81766.msg564453#msg564453 Matt introduces Grouping Functions]
: [http://yabb.jriver.com/interact/index.php?topic=94848.msg663421#msg663421 Use field names, not field values (square bracket notation)]
}}

Revision as of 05:37, 26 January 2016

See also: {{#if:Expression Language |[[:Expression Language{{#if:||{{{l1}}}}}]] |Error: Template must be given at least one article name

}}{{#if:Expression Language#Function Index|{{#if:|, | and }} [[:Expression Language#Function Index{{#if:Function Index||Function Index}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{3}}}{{#if:||{{{l3}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{4}}}{{#if:||{{{l4}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{5}}}{{#if:||{{{l5}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{6}}}{{#if:||{{{l6}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{7}}}{{#if:||{{{l7}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{8}}}{{#if:||{{{l8}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{9}}}{{#if:||{{{l9}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{10}}}{{#if:||{{{l10}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{11}}}{{#if:||{{{l11}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{12}}}{{#if:||{{{l12}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{13}}}{{#if:||{{{l13}}}}}]] }}{{#if:|{{#if:|, |, and }} [[:{{{14}}}{{#if:||{{{l14}}}}}]] }}{{#if:|, and [[:{{{15}}}{{#if: || }}]] }}{{#if:| —
Error: Too many links specified (maximum is 15)

}}

The expression language is largely used to evaluate one file at a time. The grammar implies that something like Field(Artist) should get the Artist value for the current file being evaluated. Grouping Functions are a special class of functions that operate on a group of files, instead of on individual files. A simple example would be a function to count the number of artists in the current group.

Grouping Functions may only be used in relevant areas (most notably Categories and the Tag Action Window) where Media Center displays groups of files, and not to individual file listings (such as an expression column in a File Details View).

GroupCount(…)

Counts the members of a specified group (in a category or field).
Description GroupCount(field)

GroupCount() can be used to count the members of a group of files.

  • Argument field is optional (defaults to current grouping).
Examples Example Threads:
Matt introduces Grouping Functions
Use field names, not field values (square bracket notation)
(Back to top)   (Function index)

GroupCount(…)

Counts the members of a specified group (in a category or field).
Description GroupSummary(field)

Smartly summarizes the members of a specified group (mode, mean, min, max, etc as is most logical for that grouping).

  • Argument field is optional (defaults to current grouping).
Examples Example Threads:
Matt introduces Grouping Functions
Use field names, not field values (square bracket notation)
(Back to top)   (Function index)