Up-to-date with version 3.1.6305
Any part within a function that you want rendered as text in the output should be contained in quotes, even spaces.
Functions can be nested and combined in almost any way you can imagine. See Useful Virtual Tag Formulas for some examples.
Contains / IsMatch Edit
$Contains checks whether the tag contains the given value (string or other tag).
$IsMatch checks whether the tag matches a regular expression. For help with regex, see this page.
Both functions return T if true and F if false. For more advanced results combine with
$If($Contains(<Tag>,Search Value)="T",True Result,False Result)
Returns a date field formatted to your specifications. Expressed as
Format can be any combination of yy or yyyy for year (2 digit or 4 digit), M or MM for month (MM will include leading 0s), and d or dd for day. If available, it will also handle hours (h or hh), minutes (m or mm) and seconds (s or ss). You can insert any separating characters you want, e.g.
Returns the first value of a multi-value field. Expressed as
For later values, use one of the
Groups tag values by the first "#" letters (e.g. putting 3 will group by the first three letters). Expressed as
Returns one of two values. Expressed as
$If(Criteria,True Result,False Result).
Basic criteria takes the form of
<Tag1>=<Tag2>. For numerical tags you can use > or < (less than or greater than) as well as equal. If the criteria is true, you'll get the True result, otherwise you'll get the False result. Both the criteria and the results can include other functions.
And / Or Edit
These are subfunctions of $If which can evaluate two criteria instead of just one.
$And requires that both criteria be met in order to return the true result.
$Or requires that only one of the two be met in order to return the true result.
$If($And(Criteria 1,Criteria 2),True Result,False Result)
This is a variant of
$If for dealing with null values (empty fields). Expressed as
$IsNull(<Tag>,True Result,False Result). If the checked tag has any value at all, even 0, you will get the False result. Only if it is blank or non-existent will you get the True result.
Left / Right Edit
Returns "#" digits from the left (beginning) or right (end) side of the tag, respectively. Formatted as
Lower / Upper Edit
Converts tag to all lower case or all upper case, respectively. Format as
Pads numerical tags to "#" digits by adding zeros to the left side. Expressed as
Replace / RxReplace Edit
$Replace finds the Search Value in a tag and replaces it with the Replace Value.
$RxReplace does the same, but can use regular expressions for both searching and replacing. For help with regex, see this page.
$Replace(<Tag>,Search Value,Replace Value).
Applies the criteria found in the "Ignore Words" box in Sorting & Grouping. If none are found, it still treats "The" as an ignored word. Expressed as
For example, output of
$Sort(<Artist>) where the Artist is "IgnoredWord ABC" is "ABC, IgnoredWord".
Split / RSplit / RxSplit Edit
$Split returns "#" section of the text based on a split character or set of characters, counting from left to right (i.e. from the beginning of the string to the end). For instance, if Title for a particular track contained "One Two Three", then the function
$Split(<Title>," ",2) would return "Two" because it is the second section of the text based on splitting at the spaces.
$RSplit does the same, but counts from right to left (from the end of the string to the beginning).
$RxSplit is the same as
$Split (works left to right), except the split value can be a regular expression. For help with regex, see this page.
Trims all spaces from the beginning and end of a tag. Expressed as