By Bruce Gilstrap, nQativ Software Development
Customers are always telling us how much they like the fact that ActivityHD™ allows them to see their information. As ActivityHD™ users ourselves, we share your enthusiasm about this feature. Among the many reasons that seeing your information is a Very Good Thing is that it is easier to spot errors in it--especially missing data. But then what? What if you discover that some pieces of information are missing? What if those pieces of information are missing from a large number of items? Well, you could start entering the missing pieces of information on all of those items by hand, but in some cases there is an easier way.
WARNING: The tool described in this article is very powerful. Be absolutely sure you understand what you are doing before you use it. It is possible to delete or overwrite information---and lots of it---when using this tool. We recommend that you contact nQativ Support before you use it.
The Change Tool: Updating a Single Field with a Specific Value
ActivityHD™ provides a way to make systematic changes to any number of items at once: the Change tool (or Mass Changer, or simply Changer). Let's say that you notice that the main telephone number is missing from several AR Customer Contacts. In this case, you simply want to add the same main telephone number to all five Contacts. You would select each of the Contacts that needs the main telephone number and then run the Changer by clicking the "Change" button in the menu bar (the lightning-bolt button).
The Changer window will open. To change the value of the Main Phone field, click that entry in the list of fields, enter the number in the "Main Phone" field that appears to the right, and then click the Next button to begin making the changes.
When finished, your list of Contacts will look like this:
But now you notice another problem: somehow the phone numbers that should have been entered as Mobile numbers were added as Home numbers instead. How can you fix this without re-entering all those numbers? You can't simply replace the currently blank Mobile field with a single value because each Contact has a unique phone number. What you really want is to copy the Home number to the Mobile number field and then remove the numbers from the Home number field.
Fortunately, there is a way to do this using the Changer. Rather than selecting a field from the list of Contact fields, select "Change Bot" instead:
Now you need to tell the Change Bot what you want it to do. You do this by writing some VBScript code in the text field that is labeled "Bot."
Set Data = ChangeLoop.Data
Data.Fields("MobilePhone").Value = Data.Fields("HomePhone").Value
The first line of code tells ActivityHD™ to get ready to do something to the set of items you have selected. The second line of code tells ActivityHD™ to set the MobilePhone field to the value of the HomePhone field for each of the currently selected items. Note: The same language (VBScript) is used for all Bots throughout Activity, so an investment in learning VBScript will help you not only with Change Bots but also with other Bots (Company | Administration | Bots).
In order to remove the phone numbers from the Home field, you need to add one additional instruction before allowing the Changer to proceed. Create this second change by clicking on the "Home Phone" field in the list and clicking in the Home Phone field that appears to the right of the list. Don't type anything in this field so that the condition in the "Changes" box should read "Contact Home Phone = NULL".
Now you're ready to let the Change do its work again. When it is done, your list of Contacts will look like this:
This is a very simple example involving only a few items (in this case, Contacts). Imagine how much time it could save in other situations that involve many more items or more-complex logic to apply to them. ActivityHD™ not only puts your information right in your face, it also puts the power to manipulate it right at your fingertips!
To learn more:
• Learn Beginning Scripting - Many examples of actual scripts with line-by-line explanations
• VBScript at w3schools.com - A good place to learn how all the different functions work