Application icon

Insert Numeric Sequence

The \1 escape sequence inserts successive decimal or Roman integers. It increments the number to be inserted after each time it is unescaped. The Multi Field Editor's Insert Sequence function increments the number to be inserted on a per file basis. This statement provides equivalent functionality.

Which fields or text strings you are processing is discussed in Statement Source/Target Determination. The same topic describes the ability to treat each field or named variable as a list where each list component will be processed.

The insertion parameters are supplied the same as with the \1 escape sequence in named variable Integer to Insert. See Inserting Sequential Integers for formatting information.

The insertion point can be at a fixed position: at the beginning; at the end; at an absolute index from the beginning or the end. It can also be inserted before or after the first or last occurrence of a supplied pattern.

The inserted numeric sequence can optionally be preceded and/or followed by supplied patterns. Additionally the modified fields can optionally have leading and trailing spaces removed and all sequences of multiple spaces replaced by a single space by enabling the Trim setting.

All text fields may contain any of the escape sequences described in Escape Sequences.


example:

Set named variable 'Integer To Insert' to "1,2,1"
Insert Numeric Sequence ' - #' at the end of the Comments and Title fields, then trim


Please Read

See the Unicode Strings topic for additional information which affects the usage of this statement with modes which specify an absolute index.




Field Selection Modes in Tables