Change a specific substring in item values across multiple documents in an IBM Notes database
Change a specific substring in item values across multiple documents in an IBM Notes database
Q | I have an IBM Notes database that contains documents all containing an item whose values need to be modified to remove a couple of characters leftover from an old naming convention. How can I find all the documents that contain these characters, and then remove only those characters? |
A | scanEZ contains a powerful feature, called the Diff function, that you can use to get a clear idea of what items your documents contain. From there you can focus your efforts on a specific item across all documents. |
The scenario:
The image on the right shows a composite image of two scanEZ readouts of the values of the item "LicenseType".
In this example, the goal is to focus efforts on changing only the incorrect part of the item value, while leaving the rest intact, for a final result of uniform values across all instances of the item "LicenseType".
In your case, when it comes time to use the formula, you can simply decide what to remove and replace. | |
Isolate an item in all documents in a database.
| Step 1 Click on the "Documents" selection tree node to set the focus on all documents in your database.
Step 2 Click the 'Diff' button.
This will give you a summary or all the items found in the selection of documents. You will also see the status of their values: if the times are present in all documents or not, and if they are present, if the values are uniform or not. |
| Step 3 In the Diff panel, select the item that you want to work on.
Step 4 Click 'Modify'. |
Use @formula to search and replace a substring within the items' values.
| Step 5 In the 'Modify item' dialog, make sure that the Type and Name of the item you are correct. And make sure that the '@ Set Value Using Formula' tab (the default tab) is displayed.
Note: If the Type and Name are not correct, your modifications may not work as needed. You can also run the risk of modifying a different item.
Step 6 In formula input field, input the formula found at the start of this article, modified, of course, to account for the value of the substring you want to find, and the replacement substring.
Step 7 Click 'Apply'. |
| You will see a confirmation dialog showing the number of documents tested, NOT the number of documents changed.
Step 8 Click 'OK'. |
| Step 9 Final confirmation of your changes is visible in the Diff panel if the end result is a uniform value across all documents.
In your case, you may have different values across your documents. See how to view all values for a specific item across all documents in a database in scanEZ. |