Ytria logo TUTORIALS

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


 

Before you begin:

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, change your values as needed, 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 to add your new item to, 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:

<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<if target="var" test="{%ListSize%}" mode="NotEquals" Value="">
<ExecuteListAction/>
</if>
<!--The following three lines let you specify the name and value of the item to be added,
as well as the document category whose documents the item will be deployed to.
Simply enter your desired values where indicated.-->
<SetVar ItemToAdd="Enter your value here"/>
<SetVar ItemValue="Enter your value here"/>
<SetVar DocumentCategory="Enter your value here"/>

<!--The following Expand/Focus sequence will allow the focus to be placed on the documents
within the selection tree category specified.-->
<Expand target="tree" category="Documents" type="{%DocumentCategory%}"/>
<focus target="tree" category="Documents" type="{%DocumentCategory%}"/>

<!--The CreateItem script block is where we define the item to be added. If the item already
exists, it will not create a new one, instead it will skip the document and move on to the
next. In this particular case, the item added will be a Text item that will use the name
and value defined in the beginning of the script.-->
<CreateItem OnExisting="skip">
<SetParam field="TypeList" value="Text"/>
<SetParam field="FieldName" value="{%ItemToAdd%}"/>
<SetParam field="FieldValue" value="{%ItemValue%}"/>
<SetParam field="IsProtected" value="true"/>
</CreateItem>
</ytriaAutomation>