Ytria logo TUTORIALS

This website require JavaScript for full functionality. Please enable JavaScript in your Web browser.


Before you begin:

This script is part of a series designed to help you understand your IBM Notes and Domino environment for consolidation, be it for an imminent migration or for routine maintenance.
If you want to learn more about how Ytria's automation scripts function, see our automation basics help page.

For single databases:

Step 1 Copy/paste the script below into any text editor, and save your file in XML format.
Step 2 Open scanEZ and select the 'Database > Load Automation File' option.
Step 3 Find and select the XML file you just saved, and then click 'Open.'

For multiple databases:

Step 1 Copy/paste the script below into any text editor, change your values as needed, and save your file in XML format.
Step 2 Open databaseEZ and load your server.
Step 3 Select the databases you want to scan for profiles documents, right-click and select the option 'Execute Automation File on...' from the context menu, choose scanEZ from the list, select the servers you want to analyze, and then click 'OK'.
Step 4 Finally, find and select the XML file you just saved, and then click 'Open.'

Here is the script:

<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5">
<!--This will set the script's behavior when encountering an error. In this case, it will continue.-->
<onerror continue="true" />
<if target="var" test="{%ListSize%}" mode="NotEquals" Value="">
<!--This will allow the script to run if called from databaseEZ by using the option 'Execute Automation File On...'-->
<!--The following line defines the action to take in the List named "NoteList".
It will set values for the variables 'NoteCat' and 'NoteType'.-->
<list name="NoteList" Action="setVar" NoteCat="Designs" NoteType="Folders"/>
<!--The following Loop will be carried out in the List named "NoteList".-->
<loop list="NoteList" OnError="Next">
<UnSelect Target="tree" name="All"/>
<Select target="tree" category="{%NoteCat%}" type="{%NoteType%}"/>

<!--Whatever instances found that match the category and type stated above (folder designs) will be placed into
a virtual My Selection folder.-->
<Setparam Field="MySelectionName" Value="Selection of {%NoteType%}"/>
<Focus Target="Tree" Category="Selection of {%NoteType%}"/>
<!--If a My Selection folder is found, it will be selected, and a Values operation will be run on the designs within.
The item $Title will be added to the Values grid, and two more columns will be added using formulas to calculate
the database path and the number of documents within the folders found.-->
<if Target="Tree" Test="FocusRoot" Mode="NotEquals" Value="True">
<ShowTypeColumns value="false"/>
<SetParam Target="SelectDocumentItems" Field="AddItem" value="$Title"/>
<AddCustomColumn name="Database Path">
<SetParam field="TitleOptionType" Value="Formula"/>
<SetParam field="TitleOptionFormula" Value="@Implode(@DbName;&quot;!!&quot;)"/>
<AddCustomColumn name="Number of Docs">
<SetParam field="TitleOptionType" Value="Formula"/>
<SetParam field="TitleOptionFormula" Value="@Elements(@DbColumn(&quot;&quot;:&quot;&quot;;@ServerName:@DbName[2];@If(@Contains($Title;&quot;|&quot;);@Left($Title;&quot;|&quot;);$Title);2))"/>
<!--A report of your findings will be exported to an Excel file. The file will be found in the same
location as where you run this script from.-->
<SetParam field="FilePath" value="foldercontents.xlsx"/>
<SetParam field="SelectedRowsOnly" value="false"/>
<SetParam field="ExportType" value="Excel"/>
<SetParam field="Mode" value="AppendRows"/>
<SetParam field="ExcelSheetName" value="{%NoteType%}"/>
<SetParam field="OpenFileOnceGenerated" value="False"/>