Token Editor
The Token Editor lets you modify token values with functions, indexing, formatting, and regular expressions.
To customize a token:
- Right-click any token that appears in a text box.
- Select Token Editor
- The Token Editor dialog box will appear.
To use the Token Editor
- In the Token Editor dialog box, select one or more of the following options: Apply Function, Apply Index, Apply Formatting, and/or Apply Regular Expression.
Note: Operations in the Token Editor are applied in the following order: function, index, formatting, regular expression.
- Apply Function: This feature lets you edit the token value with one or more pre-configured operations. Click Select a function to access the Token Functions dialog box. See Token Functions for more information.
- Apply Index: For tokens that accept multiple values, you can replace the token with one of the values or all the values separated by one or more characters. The format for a token that includes an index is: %(Token#[index]#).
- The value at index: To specify which value a multi-value token will be replaced by, type the value's index number in the text box or using the scroll up-and-down arrows . Alternatively, click the token button (right arrow) to specify an index using tokens. Values are given an index number according to the order in which they are added.
- By default this editor will count the values from the start of a multi-value list. Show me some examples.
Note: If you are counting values from the start and you specify an index greater than the total number of values in the token, the token will be replaced by the last value. If you are counting values from the end and you specify an index greater than the total number of values in the token, the token will be replaced by the first value.
Note: If you type a character or string of characters other than an integer or a token in this text box, none of the token's values will be extracted. Instead, the All values separated by option below will be selected and the character(s) will be used to separate each token value.
- All values separated by: This option will have the token replaced by all values, separating them by one or more specified characters. Type one or more characters in the text box next to this option, or select a character from the drop-down menu.
- The value at index: To specify which value a multi-value token will be replaced by, type the value's index number in the text box or using the scroll up-and-down arrows . Alternatively, click the token button (right arrow) to specify an index using tokens. Values are given an index number according to the order in which they are added.
- Apply Formatting: You can apply formatting to tokens so the information that replaces them will be automatically presented in a specific way, such as in a certain date format, a percentage, a currency, a decimal, a specific number of digits, etc. The standard for formatting a token is %(Token#"Expression"#), where token is the name of the token and expression is a .NET formatting expression. More information. Show me an example.
- Apply Regular Expression: This feature lets you modify the token value using regular expressions. The format for a token that includes a regular expression is %(Token#<regex>#).Click the pattern matching button to select from a list of regular expressions. Show me an example.
Note: If your token name contains special characters such as , ( ) # < and so on, you can enclose the token name with [ ].
Note: To use Pattern Matching expressions, you must have the Pattern Matching add-on installed.
- Apply Function: This feature lets you edit the token value with one or more pre-configured operations. Click Select a function to access the Token Functions dialog box. See Token Functions for more information.
- Optional: Test your token. After applying a token function, regular expression, index, or formatting, click the Click here to test the token link. In the Test Value box, type in one or more sample token values. (You can test a multi-value token by typing values on multiple lines.) The Result Value box will show how the options you configured above will affect the token's value.
- Click OK.