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" />
<!--The following lines define the Action to take, and thus the variables to set. This will happen in two
batches. The first line sets one set of variables, the second sets another. This allows the Loop to concentrate
on one line at a time.-->
<list name="NoteList" Action="setVar" NoteCat="Designs" NoteType="Forms"/>
<list name="NoteList" Action="setVar" NoteCat="Designs" NoteType="SubForms"/>
<!--The following Loop, will iterate over the lines of the List set above. As each set of variables is set
the Loop will then select the tree nodes in the design tree that match the conditions.-->
<loop list="NoteList" OnError="Next">
<ExecuteListAction/>
<UnSelect Target="tree" name="All"/>
<Select target="tree" category="{%NoteCat%}" type="{%NoteType%}"/>

<!--Anything that is selected in the tree will then be placed into virtual My Selection folders for further processing.-->
<MySelection>
<Setparam Field="MySelectionName" Value="Selection of {%NoteType%}"/>
</MySelection>
<!--If a My Selection is created, it will be selected.-->
<Focus Target="Tree" Category="Selection of {%NoteType%}"/>
<if Target="Tree" Test="FocusRoot" Mode="NotEquals" Value="True">
<!--The following block will enact a Values operation on contents of the My Selection folder. The item $Title will be added
as will five additional columns that will display database path, the number of fields, a list of fields, and a list of any
subforms.-->
<Values>
<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>
<AddCustomColumn name="Number of Fields">
<SetParam field="TitleOptionType" Value="Formula"/>
<SetParam field="TitleOptionFormula" Value="@Elements($Fields)"/>
</AddCustomColumn>
<AddCustomColumn name="Number of Subforms">
<SetParam field="TitleOptionType" Value="Formula"/>
<SetParam field="TitleOptionFormula" Value="@Elements($Subforms)"/>
</AddCustomColumn>
<AddCustomColumn name="List of fields">
<SetParam field="TitleOptionType" Value="Formula"/>
<SetParam field="TitleOptionFormula" Value="@Implode($Fields;&quot;, &quot;)"/>
</AddCustomColumn>
<AddCustomColumn name="List of subforms if any">
<SetParam field="TitleOptionType" Value="Formula"/>
<SetParam field="TitleOptionFormula" Value="@Implode($Subforms;&quot;, &quot;)"/>
</AddCustomColumn>
<Evaluate/>
<!--Any findings will be exported to an Excel file. The findings for each of the two different note
types (forms and subforms) will be placed in a separate worksheet within the same file.-->
<Export>
<SetParam field="FilePath" value="Forms_subforms.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"/>
</Export>
</Values>
</if>
</loop>
</ytriaAutomation>