Actions can be run from within an open database.
Actions which are eligible to be run in a database appear on the database's context menu's Run Action submenu.
You can designate that an action should appear on this menu in the Action Manager via setting the Association column to D (database).
When an action is run from the Run Action menu, an Open Database for Querying statement is automatically executed. The opened query database has an identifying prefix of UI, is keyless and is opened as grabbing. Running an action on this menu eliminates the need of locating and opening the database in the action. The rules of action execution still apply. At least one track must be selected in the main window unless it is marked as Always in the Action Manager. Note that if you run an action via a keyboard shortcut, you are not running it from this menu. Additional information can be found in Syncing a Query Database with an Open Database Viewer.
You can force the display of actions that only apply to a particular database in two ways. The first method is by naming appropriate actions as:
database name>>remainder of name
This method requires you to rename the action and is only valid for one database. As of Yate v6.13 this method is deprecated.
The second method is to create a runtime settings set with the same name of the action. This can easily be done by selecting the appropriate action in the Action Manager and choosing Edit Runtime Settings from the context menu. This method does not require that an action be renamed and has far more configurability.
Using a runtime setting, there are various methods of specifying that the action is valid for specific databases.
In the runtime settings set if you can create an item named db+. The value of the item is a comma separated list of database names which can run the action.
If you want to exclude databases, in the runtime settings set create an item named db-. The value of the item is a comma separated list of databases which cannot run the action. If db+ and db- both exist, db- is ignored.
You can also specify that the action can only run in a database with a particular uid (Unique ID). uids can be assigned to databases when they are created by the Create Album/Track Database statements. Place a uid item in the runtime settings where the value is a list of uids which are acceptable. uid takes precedence over db+ and db-.
You can also further qualify the validity of an action for particular databases. To only display the action in album databases, create an album only item with a value of 1 or true. To only display the action in track databases, create an track only item with a value of 1 or true.
The runtime setting items are processed in the following order:
uid
db+
db-
track only
album only
This means one (or none) of uid, db+ and db- can be used with one (or none) of track only and album only.