# Fold

This statement is used to fold fields, a named variable or fields listed in a named variable. When a string is folded it is transformed to a representation which eases the comparison with similar items. Typically fields which represent names are what you might fold. The folding which occurs here is identical to that performed by the List Manipulate statement's Identify Duplicates function.

More information is given in Statement Source/Target Determination regarding the runtime determination of which items to fold.

Note that this statement always folds items delimited by the multi value delimiter separately. When the source is a list, each list item is decomposed into items delimited by the multi value delimiter.

Note that regardless as to which options you select, the following transformations always occur:

- Leading and trailing spaces are removed.
- Sequences of multiple spaces are converted to a single space.
- Unicode wide and narrow characters are normalized to a consistent representation. Typically the narrow representations result.

The following options can be enabled.

Case insensitive
  Make alphabetic case insignificant. Typically this results in entirely lowercase alphabetic characters.
Diacritic insensitive
  Diacritic marks are removed.
Ignore punctuation
  All punctuation characters are removed.
Ignore leading article
  A leading article found in the Natural Sort Exception set will be removed. This means The Rolling Stones would become Rolling Stones as long as the set contained 'the'. Note that the leading article test is always case insensitive. The test is only performed if there is more than one space separated component in the source item.
Ignore Sort Form Suffix List
  A suffix which is found in the Sort Form Suffix Replacement set is removed. Note that set elements marked as + are not considered. If the set contained the word 'band', Dave Matthews Band would become Dave Matthews. Note that the suffix test is always case insensitive. The test is only performed if there is more than one space separated component in the source item.
Ignore all Spaces
  Overrides the default space transformations and removes them all.

Field Selection Modes in Tables