Application icon

Running Actions from the Multi Field Editor

The Multi Field Editor is a convenient place to perform a variety of canned text manipulations which operate on selected files with one or more specified fields. The Multi Field Editor's Actions panel supplies a list of actions which can be run. The list of actions is determined by the Association column in the Action Manager. All actions which have an M in the Association column will be displayed, even if the Hidden column is checked.

When an action is started from the Multi Field Editor, the Action Manager's All Files and Always columns are ignored. (The Multi Field Editor's functions only operate on selected files and the MFE never extends the file selection).

Named variable Run from Multi Field Editor will be set to 1. You can use this named variable to test if an action is started from the MFE. The Test Run Context statement can also test if an action was started from the MFE.

Multi Field Editor actions can also be run from an edit panel function button's Multi Field Editor Actions menu. Note that when an action is run in this manner it is actually being run by the Multi Field Editor. However, when run from a function button an additional named variable will be set. Run from Function Button will be set to the name of the field associated with the function button. You can use this named variable to test for the specific run from a function button condition.

For consistency reasons an action started from the Multi Field Editor should provide its functionality on all fields which are currently selected in the Multi Field Editor. Note that it is perfectly valid to ignore selected fields which are not appropriate for the functionality being provided. The Multi Field Editor does the same. The selected fields can be determined by using an Get Info statement with the List of Supplied Fields function. Example:


Get Info: List of Supplied Fields to named variable 'Selected Fields'

You can use list manipulation statements to remove those fields which are not appropriate to the function. For example remove all fields which can have multiple values and do not have a default value.


Get Info: List of Supplied Fields to named variable 'Supplied Fields'
Create a list of all non simple text fields in named variable 'Exclusions'
List Manipulate remove all items in 'Selected Fields'(⏎) which match any item in 'Exclusions'(⏎). Save to 'Selected Fields'(⏎)

Here's a complete example which performs two MFE functions by removing leading articles and converting to title case. All fields which should not be modified are ignored:

Cancel if the current execution context does not support Run from Multi Field Editor
' Get the selected fields
Get Info: List of Supplied Fields to named variable 'Supplied Fields'
' Ignore any set fields which we are not interested in modifying.
Create a list of all plain text fields in named variable 'temp'
List Manipulate take the intersection of items in 'Selected Fields'(⏎) and 'temp'(⏎). Save to 'Selected Fields'(⏎)
' Perform the functionality.
Removing leading article in fields in named variable 'Selected Fields', as lists with delimiter "⏎"
Case lower-Title Case in fields in named variable 'Selected Fields' with names, exceptions, replacements and Roman Numerals, process as list with delimiter "⏎"

If you only wanted to be able to run the action via the Artist field's function button you could start the action with:

Cancel if the current execution context does not support Run from Multi Field Editor
Test if named variable 'Run from Function Button' is not equal to "Artist" (Set test state)
Cancel with failed run context