Ytria logo DOCUMENTATION
⚠ This page requires javascript enabled in browser
Automation / viewEZ Automation

 

Tag: OpenViews

The OpenViews action, along with any grid-compatible child actions, lets you automate the process of opening the View window on a set of selected views and setting the dialog's inner grid configuration.

<OpenViews KeepAlive="True">
<Add ColumnID="V1" Position="2"/>
<Add ColumnID="V6" Position="3"/>
<Add ColumnID="V7" Position="4"/>
</OpenViews>

Detailed Description

Within the dialog, general grid automation tags can be used as child actions to manipulate the grid configuration, sort and filter data, export data shown in the grid, etc.
See the example script below.

Example Script

<YtriaAutomation Version="1.0" Application="viewEZ" ApplicationVersion="16.5.0" DlgProgress="False">
<Load Database="Mailtest.nsf" Server="ACME01/ACME"/>
<Unselect>
<SetParam Name="All"/>
</Unselect>
<Select>
<SetParam NoteID="hC9E"/>
<SetParam NoteID="3254"/>
<SetParam NoteID="3282"/>
</Select>
<OpenViews keepAlive="False">
<Add ColumnID="V1" Position="2"/>
<Add ColumnID="V2" Position="3"/>
<Add ColumnID="G3" Position="4"/>
<Add ColumnID="F8" Position="5"/>
<filter ColumnID="V2" Mode="Contains" Text="Calendar"/>
<Select Lines="All"/>
<Export>
<SetParam field="FilePath" value="D:viewEZ-views.html"/>
<SetParam field="ExportType" value="HTML"/>
<SetParam field="SelectedRowsOnly" value="false"/>
</Export>
</OpenViews>
</YtriaAutomation>

In the script above, viewEZ will be launched on the database "Mailtest.nsf" and three views will be selected. The action OpenViews will the open the 'Views…' dialog and it's child actions will ensure that columns with the IDs of "V1", "V2", "G3" and "F8" are added to the grid and placed in positions 2, 3, 4, and 5 respectively. A filter will be enacted on column V2 to find any text containing the string "Calendar", and all remaining lines will be selected and exported to an html file named "viewEZ-views.html". The 'Views' dialog will then close.