# Statement Source/Target Determination

Various statements which specify a list of fields in a table support the ability to configure which text items should be processed. These items may be the source orm target of a function.

The item mode control immediately above the top left of the table is used to select the mode controlling which text is processed. The following values may be present.

Fields in Table
  This is the source mode in effect when a statement is first created. The table specifies which fields are to be operated on or not operated on (see Field Selection Modes in Tables). Every selected file appropriate for the current execution mode will be processed.
Named Variable
  When this mode is selected, the table is hidden and a text field will appear. The contents of the text field represents the name of a Named Variable. The contents of the specified named variable are processed by the statement. Regardless as to how many files are selected, the statement will only be executed once. Not all statements support this mode.
Fields in Named Variable
  When this mode is selected, the table is hidden and a text field will appear. The contents of the text field represents the name of a Named Variable. The contents of the named variable after being unescaped are interpreted as a list of symbolic field names. The list can be delimited by default list delimiters (\~), newline characters (\n) and commas.
  Items which do not represent field names are ignored. The list of valid fields are processed exactly as if they were specified in the Fields in Table mode. This effectively provides a means of specifying which fields are to be processed at runtime.
  The complete list of available fields can be viewed in the table in the Multi Field Editor. Most field names can be inserted by the holding down the Shift key and selecting Insert Yate Field on the Yate Transformations text field context menu. Fields which cannot be associated with single values (such as User Defined Text Info) are not available on the menu.
Inline Fields (deprecated)
  In earlier releases of Yate, the Exists statement supported the specification of an inline list of fields. The specification did not have to be a named variable. For consistency reasons, this mode is deprecated. It is only displayed for Exists statements which have this older mode in place. If you edit the statement and change the mode, this setting will no longer be available.

The item mode control determines which items are processed. The as lists or as list checkbox can be used to treat each item as a list delimited by a specified delimiter. If a delimiter is not specified, the default list delimiter (\~) is assumed. When as lists is enabled, each list component is processed individually. If you have a Replace statement which specifies Album and Artist in the table and as lists is specified, list items in Album and Artist will be processed individually.

The named variable/list text fields may contain any of the escape sequences described in Escape Sequences

The following table describes the applicable statements and their supported modes:

Statement | Fields in Table | Named Variable | Fields in Named Variable | Inline Fields | As Lists
--- | --- | --- | --- | --- | ---
Append | ✓ | ✓ | ✓ | × | ✓
Bracket | ✓ | ✓ | ✓ | × | ✓
Case | ✓ | ✓ | ✓ | × | ✓
Clear | ✓ | ✓ | ✓ | × | 1
Copy | ✓ | ✓ | ✓ | × | ×
Exists | ✓ | ✓ | ✓ | ✓ | ×
Find and Remove | ✓ | ✓ | ✓ | × | ✓
Fold | ✓ | ✓ | ✓ | × | ✓
Get First Line | ✓ | ✓ | ✓ | × | ×
Prepend | ✓ | ✓ | ✓ | × | ✓
Re-encode | ✓ | ✓ | ✓ | × | ×
Replace | ✓ | ✓ | ✓ | × | ✓
Remove Invalid Characters | ✓ | ✓ | ✓ | × | ×
Sort Form | ✓ | ✓ | ✓ | × | ✓
Trim | ✓ | ✓ | ✓ | × | ✓

1. Note that the Clear statement handles as list differently than the other statements. No delimiter can be specified. The default list delimiter (\~) and newline character (\n) are both accepted as delimiters.