The Five Most Frequently Asked Frequently Asked Questions About Teamstudio Analyzer

There’s a sense in which Teamstudio Analyzer is the elder statesman amongst our developer tools. Although Analyzer wasn’t the first product ever released by Teamstudio (that honor goes to the ill-fated Teamstudio Designer), Analyzer is the oldest product still in production today. Analyzer was born in early 1997, supporting the then-latest release of Lotus Notes: R4.5. Yes kids, that makes this product 23 and a half years old, and it’s still going strong.

Of course, during that time we have opened (and closed) a tech support ticket or two. We don’t actually know how many support tickets have been opened for Analyzer, but let’s just say it’s enough to have learned a few tips and tricks about using this venerable developer tool. And so we thought it might be helpful to publish five of the most frequently asked, frequently asked questions about Analyzer.

1. Can I use regular expressions in filters?

Yes. If you are creating an audit filter and you want to use a regular expression in your search term, this can be done using the Flags option on the Filter document:

Screenshot1.png

Type your expression in the validation formula field directly.

2. Can I check whether a given LotusScript function is being called?

Yes, you can do this by creating a filter to search for calls to the function. Here is an example filter that looks to see if the function "UpdateDoc" is called:

For more information on writing filters for Analyzer, see this post: Create Your Own Application Audit Filters for Fun and Profit.

3. Can I run Analyzer from a scheduled agent?

Yes, you can call Analyzer from LotusScript. Use the Analyzer script library, located in the Teamstudio Reports template (tmslogs.ntf), to set up an analysis to be run in batch. If you work within the Teamstudio Reports template, you don’t have to worry about creating the Analyzer script library. If you work within a different database/template, you must copy over this script library to your new database to be able to call Analyzer.

The Teamstudio Reports template also includes sample agents. You can run them as provided to see how they work. The sample agents demonstrate how to call Analyzer dynamically, whether real-time or on a scheduled basis.

As standard Domino agents coded in LotusScript, they have the same basic structure. First, they determine the files to be analyzed and the output analysis file to be created. Then they call a function to start Analyzer processing. The function calls pass the file and other necessary parameters. The Analyzer script library contains the constant and function definitions necessary to start Analyzer.

You will likely want to change these agents to provide the appropriate file and path data. You can change, or copy and then change the agents. The script library and agents (with your modifications, if any) must be present in the database for which you will run the agent.

To delve into the detail of running Analyzer (and other Teamstudio tools) from an agent, see this post: Using the Teamstudio APIs to Speed Up your Processes.

4. Can Analyzer help find unused design elements?

Yes, there are several ways Analyzer can help with this task. The most useful views that can help find unused design elements are the References and Dependencies views. The References view will show you design elements referenced by other elements:

And the Dependencies view shows elements that are dependent on others:

So for example, if you suspect that a code library that is in your database is not being used, then check to see if it’s listed in either of these views. If not, then it is probably not being used. Our recommendation would be to test this by renaming the library and then recompiling all LotusScript to ensure it does not cause any errors. If not it can be archived or deleted.

5. What is the XRef folder for?

You may have noticed a folder named XRef, and wondered what it is for. This folder can be used to show everywhere a field is referenced. To use it, open the XRef folder and, if there are any entries in it, click on the Reset button to clear them out. Then switch to a view containing the field you want to find references to (for example, Objects by Name\Fields), and drag the field into the XRef folder.

When you have dragged all the fields you want to find references to, just hit the Add References button. Every design element that refers to that field will be included in the folder. Note that the XRef folder can only be used to find references to fields.

If you have more questions or want to discuss any aspect of using Analyzer, or any of our tools, click below to start a conversation. We love to chat!