Text Constants
The Text Constants window finds the text constant (TextConst) declarations
whose text matches a pattern. Use it to get from a message a user saw to the code that shows it.
Opening Text Constants
- Choose Search › Text Constants by Content… in the Workspace window.
- In Universal Search, type
>text constantsand press Enter.
The Text Constants window

| # | Name | Description |
|---|---|---|
| 1 | Search box | The pattern to find; see Pattern syntax. Press Enter to search. |
| 2 | Search | Starts the search. |
| 3 | All objects | Searches every object in the store. |
| 4 | Currently filtered objects | Searches the objects the object index shows. |
| 5 | Count | The number of text constants found. |
| 6 | Copy Results to Clipboard | Copies the results as tab-separated text with the columns Object and Name. |
| 7 | Collapse all | Collapses every node. |
| 8 | Expand all | Expands every node. |
| 9 | Results | Objects and, under each, the matching text constants. The object of the top row stays pinned while you scroll. Select a constant, or double-click it, to go to its declaration in the workspace window. |
Pattern syntax
| Text | Matches |
|---|---|
* | Any run of characters, including none. |
? | Any single character. |
| Anything else | Itself, ignoring case. |
The pattern matches anywhere in each language value of a constant. The language prefix, such as
ENU=, is not part of the value, so a pattern in any language the constant holds finds it.
Find the code behind an error message
Use this when a user reports an error message and you need the code that raises it.
- Choose Search › Text Constants by Content….
-
Type the fixed words of the message, with
*where it shows values. The constant holds placeholders such as%1where the message shows values. For example, for "You cannot create this type of document when Vendor 12345 is blocked with type Payment", typeyou cannot*this type of document when *is*. - Press Enter and select the constant in the results to go to its declaration.
- Right-click the constant in the object view and choose Find Usages to list the code that uses it.
A message that is not in a text constant, such as one written straight into an ERROR call, is
found with Find a message written into code.
Behavior
- Window title: Search Text Constant Contents after the product name, also shown as the window's heading.
- No cancel: a search runs to the end; the window has no Cancel button.
- Background task: the search also shows among the workspace window's background tasks.