Hi. This has to be done in an action. I've taken the liberty of putting in a few sanity checks regarding the formatting of the Composer field. The way I've done it a composer with only a last name will work and the (text) is optional.
The action can be downloaded at: https://2manyrobots.com/actions/ExtractandPrependComposertoTitle.zip
Unzip the downloaded file. Install the unzipped plist file via Yate>Import Preferences or by dragging the file to the main window's file list area (you will hear a plink).
Once installed you will have an action named: 'Extract and Prepend Composer to Title' The action can be accessed in a variety of ways. From a menu, from the toolbar, by a keyboard shortcut, etc.
For those of you interested here's a dump of the action. Remember that the forum mailer removes backslash characters and that the statement display is not always a full representation.
Force Grouped Execution Extract the last name from Composer fields formatted any of the following:⏎…
' Make Variable 1 a copy of the Composer field
Copy the Composer field to Variable 1
' Remove the , and everything which follows
Find "," in Variable 1, remove it and everything after, set state
if false
' We didn't find a , Look for a (
Find "(" in Variable 1, remove it and everything after, set state
endif
' Remove leading and trailing spaces in Variable 1
Trim Variable 1 (SP) [Leading] [Trailing]
' If Variable 1 is not empty prepend it to the Title
Test if the Variable 1 field is empty (Set result)
if false
Prepend "\v1:…" to the Title field
endif
|