Application icon

User Defined Fields

Yate supports various action steps to modify the values associated with fields. The functions will not work with individual instances of field types which support multiple named items. The purpose of this function is to allow you to manipulate individual items of these types. Note that this function cannot be used to manipulate the default comment which has an empty description field.

Usually the statement operates on the first item which meets your search criteria. You specify whether you are searching for a UDTI, UDURL, Comments, UFID, General Encapsulated Objects, Private Information items or Lyrics. Additionally you specify the name of an item and whether or not it is the entire name or a prefix. ie. the start of the name. Note that by default the name field is case sensitive for matching purposes. You can elect to make the search case insensitive. Convenience picker buttons are displayed to choose various commonly used items.

Except for General Encapsulated Objects and Private Information items, you can also choose to Match by index. When this option is specified, the name field is converted to an integer value at run time. If the index does not evaluate to a valid integer, zero is assumed. The integer value represents an index into the field type's list of items. The indexes are zero based. A match occurs if the index is valid. Note that the indexes are primarily intended to be used with enumeration lists created by the Field List Enumerator statement. Note that the internal ordering of a list of items may not correspond to the sorted list displayed in edit panels.

The following options/functions are not valid when Match by index is specified:

The supplied name or index may contain any of the escape sequences described in Escape Sequences.

The following functions are currently supported:

Remove
The Remove function is used to remove matching items. Typically the first matching item will be removed. If the All options is selected, all matching items will be removed. If the Only if empty option is specified, items with non empty values will not be removed. If the Set state option is specified, the action test state will be set to true if anything was removed, otherwise it will be set to false. The All option is not valid with Match by index.
Move
The Move function allows to to move a matching item to another list type. The move will not occur if an item of the same name as the matched item already exists in the destination list. If the Set state option is specified, the action test state will be set to true if an item was moved, otherwise it will be set to false.The Move option is not valid with Match by index.
Export name
The Export Name function will save the name of a matched item to a variable. This is only useful if you are searching for a name as a prefix or performing a case insensitive search. If a match cannot be made and the Create option is specified, an item with the specified name will be created with an empty value. If a match was not made and Create was not specified, the variable will be set to empty. If the Set state option is specified, the action test state will be set to true if an item was matched, otherwise it will be set to false.
Export value
The Export Value function will save the value of a matched item to a variable. If a match cannot be made and the Create option is specified, an item with the specified name will be created with an empty value. If a match was not made the variable will be set to empty. If the Set state option is specified, the action test state will be set to true if an item was matched, otherwise it will be set to false.
Import name
The Import Name function will set the name of a matched item from a variable. This is essentially a rename. If the Set state option is specified, the action test state will be set to true if an matched item had its name set, otherwise it will be set to false. For historic reasons, the Create option is supported. If a match is not made and Create is specified, an item with the specified name will be created with an empty value.
Import value
The Import Value function will set the value of a matched item from a variable. If the variable is empty the rename will not occur. If the Set state option is specified, the action test state will be set to true if an matched item had its value set, otherwise it will be set to false. If a match is not made and Create is specified, an item with the specified name will be created with the variable's value.
Test
The Test function is used to test various conditions without changing anything. The action test state is set to true if the selected test is true, otherwise false. The Test function choices are self explanatory with the possible exception of Test if the item exists, is not empty and is consistent. Consistent means is the value the same in all tracks. Note that with the consistent test, the All option is implied.

Note that for General Encapsulated Objects and Private Information items, you are limited to the Remove functionality. Essentially you can do a selective removal of one of these items.

When the action is being run stepwise, the action test state will be be set as follows:

All option disabled
The action test state will be true if the result for any file was true.
All option enabled
The action test state will be true if the result was true for all files.