Media Center expression language-NEW: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
====ListCount(...): Returns the number of items in a delimited list====
====ListItem(...): Returns a specified value from a delimited list====
{| style="width: 100%; border: 1px solid black" align="top" border="1" cellpadding="3"
{| style="width: 100%; border: 1px solid black" align="top" border="1" cellpadding="3"
|- valign="top"
|- valign="top"
! scope="row" style="white-space:nowrap; background: #A8E4A0; color: black; border: 1px solid black;" width=100 | ListCount()
! scope="row" style="white-space:nowrap; background: #A8E4A0; color: black; border: 1px solid black;" width=100 | ListItem()
| style="background: #ecfeea; color: black; border: 1px solid black" width=1200 | ListCount is used to return the number of items that exist in any given field, using any given delimiter.
| style="background: #ecfeea; color: black; border: 1px solid black" width=1200 | This function numbers list items starting from zero and returns the value of a specifically numbered item.
|- valign="top"
|- valign="top"
! scope="row" style="background: #A8E4A0; color: black; border: 1px solid black;" | Construction
! scope="row" style="background: #A8E4A0; color: black; border: 1px solid black;" | Construction
| style="background: #ecfeea; color: black; border: 1px solid black" | '''ListCount(Field to count,Delimiter to use)'''<br>
| style="background: #ecfeea; color: black; border: 1px solid black" | '''ListItem([Field],Number of item to retrieve,Field delimiter to use)'''
'''Field to count''': ''Typically, this will be a list type field, but this is not compulsory. The data in any field can be parsed using any chosen delimiter''


* '''Field''': ''The function will accept any given field, though is more typically used with list type fields.''
'''Delimiter to use''': ''This is optional. If not specified, the function will default to using a semi-colon delimiter. Anything can be specified as a delimiter, from a single character to a whole word or words.''
* '''Number of item to retrieve''': ''The number of the item in the list to retrieve. The list items are numbered starting from zero.''
* '''Field delimiter to use''': ''This is optional. If not specified, the function will default to using a semi-colon delimiter. Anything can be specified as a delimiter, from a single character to a whole word or words.''
|- valign="top"
|- valign="top"
! scope="row" style="background: #A8E4A0; color: black; border: 1px solid black;" | Examples
! scope="row" style="background: #A8E4A0; color: black; border: 1px solid black;" | Examples
|style="background: #ecfeea; color: black; border: 1px solid black" | '''listcount([People])'''<br>
|style="background: #ecfeea; color: black; border: 1px solid black" | '''EXAMPLES'''
''No delimiter has been specified here, therefore the function will default to using a semi-colon. The result here will match the number of people shown in a properly tagged photo. Note that the function is smart, so, if a file has no [People] tag, the function will return zero (0), and if it has [People] data, but no semi-colon, the function will return one (1).''
|}
|}
<div style="text-align:right;">([[#top|Back to top)]]</div>
<div style="text-align:right;">([[#top|Back to top)]]</div>

Revision as of 19:35, 21 September 2010

ListItem(...): Returns a specified value from a delimited list

ListItem() This function numbers list items starting from zero and returns the value of a specifically numbered item.
Construction ListItem([Field],Number of item to retrieve,Field delimiter to use)
  • Field: The function will accept any given field, though is more typically used with list type fields.
  • Number of item to retrieve: The number of the item in the list to retrieve. The list items are numbered starting from zero.
  • Field delimiter to use: This is optional. If not specified, the function will default to using a semi-colon delimiter. Anything can be specified as a delimiter, from a single character to a whole word or words.
Examples EXAMPLES
(Back to top)