Grouping Functions: Difference between revisions
RoderickGI (talk | contribs) No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
* [http://yabb.jriver.com/interact/index.php?topic=81766.msg564453#msg564453 Matt introduces Grouping Functions] |
* [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)] |
* [http://yabb.jriver.com/interact/index.php?topic=94848.msg663421#msg663421 Use field names, not field values (square bracket notation)] |
||
}} |
|||
=== <span id="GroupCountQuery">GroupCountQuery(…)</span> === |
|||
: Counts the number of items in a specified group |
|||
{{function description box |
|||
| name=GroupCountQuery |
|||
| arguments=field 1, Field 2 |
|||
| description= |
|||
: '''''Field 1''''' is the name of the field to group by. More than one field can be specified, use a semi colon to separate field names. |
|||
: '''''Field 2''''' is the name of the field to count. |
|||
<u>'''Notes:'''</u><br> |
|||
: * GroupCountQuery is special because it returns counts from the entire library, not just the currently filtered subset. |
|||
: * GroupCountQuery can only do what it does by using a cache of the library data. The cache is rebuilt every 60 seconds, so, when testing these, changes may not be immediately noticeable. |
|||
: * GroupCountQuery uses field names only, the usual square brackets should not be used. |
|||
: * Special characters are required to be escaped, otherwise, they will break the expression. For example, use Album Artist /(Auto/) not Album Artist (Auto) |
|||
| examples= |
|||
'''{{monospace|[album artist (auto), 1] (GroupCountQuery(album artist /(auto/), album) albums)}}''' |
|||
: When used in the "Expression to display" field of a view pane or theater view category, returns, for example, where [Album Artist (Auto)] is Chris Rea, {{monospace|Cris Rea (10 Albums)}}<br> |
|||
: Remember, if there are 10 Chris Rea albums in the library, but due to other filters, only five are displayed, the expression will still report 10 albums as it works on the entire library. |
|||
'''{{monospace|GroupCountQuery(album artist /(auto/);Camera, album)}}''' |
|||
: This expression will return the number of albums by each artist, per camera used to take the pictures. |
|||
}} |
}} |
||
Revision as of 16:51, 12 July 2020
- This article is a incomplete. It is missing detail about critical functions, or contains a number of red links. You can help the JRiver Wiki by expanding it.
- See also: Expression Language and Function Index
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 where Media Center displays groups of files (most notably in Categories and the Tag Action Window), 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. |
---|---|
Examples | Example Threads: |
GroupCountQuery(…)
- Counts the number of items in a specified group
Description | GroupCountQuery(field 1, Field 2)
Notes:
|
---|---|
Examples | [album artist (auto), 1] (GroupCountQuery(album artist /(auto/), album) albums)
GroupCountQuery(album artist /(auto/);Camera, album)
|
GroupSummary(…)
- Summarises 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). |
---|---|
Examples | Example Threads: |