Tool: Search and replace
With the release of Comm’ant X version 10.0.44 (released in April 2021), the “Search and replace” tool became available.
This tool is only available to users with the Application Administrator rights profile.
With this tool, you can easily search and replace automated text (words and exact text fragments) throughout Comm’ant.
Important: This tool requires due care. Once texts have been replaced, they cannot be reinstated: there is no “restore” button. Be sure at all times that the correct text fragments are replaced. Evaluate the search result carefully before performing the replacement action.
Where to start
The Search and replace tool can be found under the Tools tab on the Homepage of your Comm’ant system.
- Select Tools.
- Then, in the drop-down menu, choose “Search and replace”.
How to Search and replace
After you have chosen the tool you will be presented with the following screen:
You can use the various fields and options to search and replace.
In this field, enter the desired text fragment that you want to replace. Keep in mind that the system searches for the exact text fragment, including any spaces or special punctuation.
For example: “purchasing” finds texts such as “Purchasing” but also “Purchasingreport”.
Enter in this field your replacement text. This can be a single word but multiple words with spaces or punctuation are also possible. Also keep in mind that if you include a capital letter in the “Replace with” field, the text you are searching for will also be replaced with any capital letter, even if the word you are searching for does not have a capital letter.
So if you search for “buyback” and replace it with “Buyout” all found fragments will be replaced with the capitalized replacement text.
If you check this option, the system will search for exact matching text fragments, including any capital letters.
So searching for “Buy” will find “Buyout” but not “buyout”.
If you check this option, the system only searches for entire words.
So searching for “buy” finds “Buy” but not “buyout”.
Here you will find the list of field names where the system will search for the specified text fragment. If necessary, you can exclude specific fields by removing them from the list.
- To remove a field, click on the cross next to the field name.
- To add a field, click on an empty position in the field, which will bring up a drop-down menu with the fields you can choose from.
- When you start the tool, all available field names are included by default.
For Object type
Here you will find the list of object types the system will search through to find the specified text fragment. If necessary, you can exclude specific object types by deleting them from the list.
- To delete an object type, click on the cross next to the object type name.
- To add an object type, click on an empty position in the field, which will bring up a drop-down menu with the object types you can choose from.
- When you start the tool, all available object types are included by default.
After you have specified a text fragment and set any other options, you can click “Search” and the system will immediately display where the text fragments have been found.
Only when you click on Replace will the system actually perform the replacement action.
Note: If you do not specify a replacement text, the fragments found will not be replaced but deleted.
After clicking on Replace you will always get a confirmation request before the system actually replaces the text.
About the Search result
For example, the result of a Search looks like this:
Highlighted in yellow are the text fragments found.
Highlighted in green are the results that are to be replaced.
Note: If you replace a text fragment with an empty value the result will not show green highlighted text. This is because it has disappeared after being replaced with an empty value.
HTML source code
The Search and replace tool not only searches the text fields of an object but also the underlying HTML source code. You will also find this in the search result.
This is useful if, for example, you want to modify a reference to an external website.
For example, several places in the system refer to “www.your-website.com”, but you want to change it to “www.my-website.com”. If you search for “www.your-website.com” and enter “www.my-website.com” at Replace with, the system will also make the changes in the underlying HTML code:
<a href="https://www.your-website.com">Go to our website</a>
<a href="https://www.my-website.com">Go to our website</a>
The Search and replace tool does NOT have a recovery option. Once a replacement action is completed, the result is committed to the system.
We strongly recommend that you carefully inspect the search results and make sure it meets your expectations before clicking “Replace” and thus performing the replace action.