# Remove Invalid Characters

This is a convenience statement to replicate the functionality of the Remove Invalid Characters item on the Yate Transformations menus.

The statement can operate on fields, a named variable or the a list of fields in a named variable. More information is given in Statement Source/Target Determination regarding the runtime determination of which items are being processed.

The effect of the Remove Invalid Characters functionality is context dependent. Two different transformations are performed depending on whether a field is single or multi line.

Single Line Transformation
  The following steps are performed:
  - Tab characters are replaced with a single space.
  - All control characters are removed.
  - Newline sequences are normalized.
  - All leading and trailing newline sequences are removed.
  - Any remaining contiguous sequence of newline characters is replaced by space dash space.
Multi Line Transformation
  The following steps are performed:
  - All control characters are removed.
  - Newline sequences are normalized.

When modifying the Comments, Lyrics, Terms of Use, Commercial Information Webpage, Official Artist/Performer Webpage or Rating fields only the default items are modified. If you would like the operation to modify all of items for any of these field types, select the Deep option. The option has no effect on other field types or named variables. Note that User Defined Text Info and User Defined URL items will only be processed if the deep option is specified.

When operating on fields, each field will have the transformation appropriate for its type performed. The following field types are considered as being multi line: Comments, Involved People, Lyrics, Musician Credits, Show Description, Terms of Use, User Defined Text Info and Video Description. All other fields are by default considered to be single line items.

Named variables are by default considered to be single line items.

You can override the default field processing and implicitly force single or multi line processing by changing the drop down control from Default to Single Line or Multi Line.

Field Selection Modes in Tables