SearchBy
The
SearchBy
tag, along with the applicable
SetParam child actions, lets you automate the different
Search types found in scanEZ.
( i.e.
Search by UNID;
Search by NoteID;
Search by NoteID Range;
Search Design element by Title;
Search by Formula;
Quick Retrieve Contents of View or Folder;
Full Text Search;
Extensive Search by Note Class)
<SearchBy Type="UNID">
<Setparam Field="EnterID" Value="201C6D2F900212A385257A1E0053826F;76B9CD8F3012A32285257A1E00538270"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="Test"/>
<Setparam Field="TitleOptionType" Value="Column"/>
<Setparam Field="TitleOptionColumnName" Value="($All):5"/>
</SearchBy>
Tag Attributes
Attributes | Attribute Value | Value Description | Comment |
Type | UNID
NoteID
NoteIDRange
DesignTitle
Formula
QuickRetrieve
FullText
NotesClass | | Mandatory |
Type: UNID
This will set the search type to ‘Search by UNID…'. All options found within the ‘Search by UNID’ dialog are available to set through the following SetParam options:
SetParam Options
Field Name | Compatible Field Values | Value Description | Comment |
EnterID | UNIDs to search—multiple UNIDs should be separated with a semicolon. | | |
PutSearchInSelType | Create
Append
Replace | | |
PutSearchInCreateName | User definable | Name of the My Selection folder to be created. | Not Mandatory: If no name is specified, the default name will be used. Default name is language specific. |
PutSearchInSelAppendName | User definable | Name of the My Selection folder the data will be appended to | |
PutSearchInSelReplaceName | User definable | Name of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found | |
TitleOptionType | Default
Field
Formula
Column | | |
TitleOptionFieldName | User definable | Document field name | To be used with TitleOptionType=”Field” |
TitleOptionFormula | User definable | Formula to be used | To be used with TitleOptionType=”Formula” |
TitleOptionColumnName | User definable | View name coupled with a column name, separated by a colon | To be used with TitleOptionType=”Column” |
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="UNID">
<Setparam Field="EnterID" Value="201C6D2F900212A385257A1E0053826F;76B9CD8F3012A32285257A1E00538270"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="New UNIDs"/>
<Setparam Field="TitleOptionType" Value="Column"/>
<Setparam Field="TitleOptionColumnName" Value="($All):5"/>
</SearchBy>
</ytriaAutomation>
In the script above, the ‘Search by UNID’ type search will be conducted within the database “dbtest\maildbtest.nsf” to find the UNIDs stated above. A new My Selection folder called “New UNIDs” will be created and the documents matching these UNIDs will be placed inside; their Displayed Titles will be set according to column number 5 of the View or Folder named “($All)”.
Type: NoteID
This will set the search type to ‘Search by NoteID…’. All options found within the ‘Search by NoteID’ dialog are available to set through the following SetParam options:
SetParam Options
Field Name | Compatible Field Values | Value Description | Comment |
EnterID | NoteIDs to search in the currently opened database—multiple NoteIDs should be separated with a semicolon. | | |
PutSearchInSelType | Create
Append
Replace | | |
PutSearchInCreateName | User definable | Name of the My Selection folder to be created | Not Mandatory: If no name is specified, the default name will be used. Default name is language specific. |
PutSearchInSelAppendName | User definable | Name of the My Selection folder the data will be appended to | |
PutSearchInSelReplaceName | User definable | Name of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found | |
TitleOptionType | Default
Field
Formula
Column | | |
TitleOptionFieldName | User definable | Document field name | To be used with TitleOptionType=”Field” |
TitleOptionFormula | User definable | Formula to be used | To be used with TitleOptionType=”Formula” |
TitleOptionColumnName | User definable | View name coupled with a column name, separated by a colon | To be used with TitleOptionType=”Column” |
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="UNID">
<Setparam Field="EnterID" Value="201C6D2F900212A385257A1E0053826F;76B9CD8F3012A32285257A1E00538270"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="New UNIDs"/>
<Setparam Field="TitleOptionType" Value="Column"/>
<Setparam Field="TitleOptionColumnName" Value="($All):5"/>
</SearchBy>
<SearchBy Type="NoteID">
<Setparam Field="EnterID" Value="2560; hA1A "/>
<Setparam Field="PutSearchInSelType" Value="Append"/>
<Setparam Field="PutSearchInSelCreateName" Value="NewUNIDs"/>
<Setparam Field="TitleOptionType" Value="Formula"/>
<Setparam Field="TitleOptionFormula" Value="@NoteID"/>
</SearchBy>
</ytriaAutomation>
In the script above, the ‘Search by UNID’ type search will be conducted within the database “dbtest\maildbtest.nsf” to find the UNIDs stated above. A new My Selection folder called “New UNIDs” will be created and the documents matching these UNIDs will be placed inside; their Displayed Titles will be set according to column number 5 of the View or Folder named “($All)”. Next, the ‘Search by NoteID’ type search will be conducted within the same database to find and select the documents that match the two NoteIDs stated. This document selection will be then placed into the My Selection folder titled “NewUNIDs” and the displayed title name will be set, by a formula, to display the NoteID.
Type: NoteIDRange
This will set the search type to ‘Search by NoteID Range…’. All options found within the ‘Search by NoteID Range’ dialog are available to set through the following SetParam options:
SetParam Options
Field Name | Compatible Field Values | Value Description | Comment |
EnterFirstID | User definable | First NoteID in the range to search | Mandatory |
EnterSecondID | User definable | Last NoteID in the range to search | Mandatory |
ShowEveryID | True/False | Checkbox state of the ‘Show Every NoteID for a Given Document’ | |
PutSearchInSelType | Create
Append
Replace | | |
PutSearchInSelCreateName | User definable | Name of the My Selection folder to be created | Not Mandatory: If no name is specified, the default name will be used. Default name is language specific. |
PutSearchInSelAppendName | User definable | Name of the My Selection folder the data will be appended to | |
PutSearchInSelReplaceName | User definable | Name of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found | |
TitleOptionType | Default
Field
Formula
Column | | |
TitleOptionFieldName | User definable | Document field name | To be used with TitleOptionType=”Field” |
TitleOptionFormula | User definable | Formula to be used | To be used with TitleOptionType=”Formula” |
TitleOptionColumnName | User definable | View name coupled with a column name, separated by a colon | To be used with TitleOptionType=”Column” |
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="NoteIDRange">
<Setparam Field="EnterFirstID" Value="2560"/>
<Setparam Field="EnterSecondID" Value="2622"/>
<Setparam Field="ShowEveryID" Value="true"/>
</SearchBy>
</ytriaAutomation>
In the script above, the ‘Search by NoteID Range’ type search will be carried out on the database “dbtest\maildbtest.nsf”. The documents with a NoteID that falls within the searched range of 2560 to 2622 will be selected and placed into a My Selection folder named according to the default naming convention.
Type: DesignTitle
This will set the search type to ‘Search Design Element by Title…’. All options found within the ‘Search Design Element by Title’ dialog are available to set through the following SetParam options:
SetParam Options
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="DesignTitle">
<Setparam Field="DesignElemType" Index="0"/>
<Setparam Field="DesignElemTitle" Value="Main"/>
<Setparam Field="PublicNotes" Value="true"/>
<Setparam Field="PrivateNotes" Value="true"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="Selected Designs"/>
</SearchBy>
<SearchBy Type="DesignTitle">
<Setparam Field="DesignElemType" Index="0"/>
<Setparam Field="DesignElemTitle" Value="icon-home.gif"/>
<Setparam Field="PublicNotes" Value="true"/>
<Setparam Field="PrivateNotes" Value="true"/>
<Setparam Field="PutSearchInSelType" Value="Append"/>
<Setparam Field="PutSearchInSelAppendName" Value="Selected Designs"/>
</SearchBy>
</ytriaAutomation>
In the script above, the ‘Search by Design Element Title’ type search will be carried out on the database “dbtest\maildbtest.nsf”. The specified design element titled “Main” will be selected and placed into a new My Selection folder titled named “Selected Designs”. Then, another search will be carried out (in the same database) to find the design element titled “icon-home.gif”. If found the design element will be appended to the contents of the My Selection folder named “Selected Designs”.
Type: Formula
This will set the search type to ‘Search by Formula…’. All options found within the ‘Search by Formula’ dialog are available to set through the following SetParam options:
SetParam Options
Field Name | Compatible Field Values | Value Description | Comment |
SetFormula | User definable | The formula to use to conduct the search | Mandatory: Formulas must be “escaped” using the standard HTML markup. |
SearchDocuments | True/ False | True will search all documents, false will not | |
SearchDesigns | True/ False | True will search all design elements, false will not | |
PutSearchInSelType | Create
Append
Replace | | |
PutSearchInSelCreateName | User definable | Name of the My Selection folder to be created | Not Mandatory: If no name is specified, the default name will be used. Default name is language specific. |
PutSearchInSelAppendName | User definable | Name of the My Selection folder the data will be appended to | |
PutSearchInSelReplaceName | User definable | Name of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found | |
TitleOptionType | Default
Field
Formula
Column | | |
TitleOptionFieldName | User definable | Document field name | To be used with TitleOptionType=”Field” |
TitleOptionFormula | User definable | Formula to be used | To be used with TitleOptionType=”Formula” |
TitleOptionColumnName | User definable | View name coupled with a column name, separated by a colon | To be used with TitleOptionType=”Column” |
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="Formula">
<Setparam Field="SetFormula" Value="SELECT Form="Term""/>
<Setparam Field="SearchDocuments" Value="true"/>
<Setparam Field="SearchDesigns" Value="false"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="Terms"/>
<Setparam Field="TitleOptionType" Value="Field"/>
<Setparam Field="TitleOptionFieldName" Value="Txt"/>
</SearchBy>
</ytriaAutomation>
In the script above, the “Search by Formula…” type search will be carried out on the database “dbtest\maildbtest.nsf” using the formula SELECT Form=”Term”. [Note that the formula has been written using proper HTML markup within the formula value in the script.] The selected documents will be placed into a new My Selection folder named “Terms” and the documents’ displayed title will be taken from the value found in the Field named “Txt”.
Type: QuickRetrieve
This will set the search type to ‘Quick Retrieve Contents by View or Folder…’. All options found within the ‘Quick Retrieve Contents by View or Folder’ dialog are available to set through the following SetParam options:
SetParam Options
Field Name | Compatible Field Values | Value Description | Comment |
Show | Name
Alias
NameAlias | The radio button (in the UI dialog) to select for name and alias display | Mandatory: This will change the format necessary for value of the field "ViewFolderList". |
ViewFolderList | User definable | The name and/or alias as would be shown in the View/Folder list depending on the value of the field "Show" | |
PutSearchInSelType | Create
Append
Replace | | |
PutSearchInSelCreateName | User definable | Name for My Selection folder to be created. | Not Mandatory: If no name is specified, the default name will be used. Default name is language specific. |
PutSearchInSelAppendName | User definable | Name for the My Selection folder the data will be appended to | |
PutSearchInSelReplaceName | User definable | Name for the My Selection folder whose current UNIDs will be replaced in favor of the new ones found | |
TitleOptionType | Default
Field
Formula
Column | | |
TitleOptionFieldName | User definable | Document field name | To be used with TitleOptionType=”Field” |
TitleOptionFormula | User definable | Formula to be used | To be used with TitleOptionType=”Formula” |
TitleOptionColumnName | User definable | View name coupled with a column name, separated by a colon | To be used with TitleOptionType=”Column” |
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="QuickRetrieve">
<Setparam Field="Show" Value="Name"/>
<Setparam Field="ViewFolderList" Value="Term by Date"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="Terms"/>
</SearchBy>
</ytriaAutomation>
In the script above, the “Quick Retrieve Contents of View or Folder” type search will be carried out on the database “dbtest\maildbtest.nsf” to find documents that are in the folder named “Term by Date”. The selected documents will be placed into a new My Selection folder named “Terms” and the documents’ displayed title will be set to the default values.
Type: FullText
This will set the search type to ‘Search Using Full Text…’. All options found within the ‘Full Text Search’ dialog are available to set through the following SetParam options:
SetParam Options
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="FullText">
<Setparam Field="SearchFor" Value="CatDesc"/>
<Setparam Field="Fuzzy" Value="False"/>
<Setparam Field="WordVariant" Value="False"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="Selected"/>
<Setparam Field="TitleOptionType" Value="Column"/>
<Setparam Field="TitleOptionColumnName" Value="($All):5"/>
</SearchBy>
</ytriaAutomation>
In the script above, the 'Search Using Full Text…' type search will be carried out the database “dbtest\maildbtest.nsf" to find and select all documents containing the string "CatDesc". These will then be placed in a newly created My Selection folder named "Selected" and their displayed title will be set to the column name of column number 5 in the view $All.
Type: NotesClass
This will set the search type to ‘Extensive Search by Note Class’. All options found within the ‘Extensive Search by Note Class’ dialog are available to set through the following SetParam options:
SetParam Options
Field Name | Compatible Field Values | Value Description | Comment |
NonDeleteNotes | True/False | | |
Documents | True/False | | |
Form | True/False | | |
View | True/False | | |
Filter | True/False | | |
Field | True/False | | |
ReplicationFormula | True/False | | |
PrivateDesign | True/False | | |
DeletionStubs | True/False | | |
ModifiedAfter | True/False | | |
ModifiedAfterDate | True/False | | |
PutSearchInSelType | Create
Append
Replace | | |
PutSearchInCreateName | User definable | Name for My Selection folder to be created. | Not Mandatory: If no name is specified, the default name will be used. Default name is language specific. |
PutSearchInSelAppendName | User definable | Name for the My Selection folder the data will be appended to | |
PutSearchInSelReplaceName | User definable | Name for the My Selection folder whose current UNIDs will be replaced in favor of the new ones found | |
TitleOptionType | Default
Field
Formula
Column | | |
TitleOptionFieldName | User definable | Document field name | To be used with TitleOptionType=”Field” |
TitleOptionFormula | User definable | Formula to be used | To be used with TitleOptionType=”Formula” |
TitleOptionColumnName | User definable | View name coupled with a column name, separated by a colon | To be used with TitleOptionType=”Column” |
Example Script
<?xml version="1.0" encoding="UTF-8"?>
<ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
<Load Server="ACME01/ACME">
<Load Database="dbtest\maildbtest.nsf" Select="True"/>
</Load>
<SearchBy Type="NotesClass">
<Setparam Field="NonDeleteNotes" Value="false"/>
<Setparam Field="Documents" Value="false "/>
<Setparam Field="Designs" Value="false"/>
<Setparam Field="Form" Value="true"/>
<Setparam Field="View" Value="false"/>
<Setparam Field="Filter" Value="false"/>
<Setparam Field="Field" Value="false"/>
<Setparam Field="ReplicationFormula" Value="false"/>
<Setparam Field="PrivateDesign" Value="false"/>
<Setparam Field="DeletionStubs" Value="false"/>
<Setparam Field="ModifiedAfter" Value="true"/>
<Setparam Field="ModifiedAfterDate" Value="2013/08/05"/>
<Setparam Field="PutSearchInSelType" Value="Create"/>
<Setparam Field="PutSearchInSelCreateName" Value="Selected Designs"/>
</SearchBy>
</ytriaAutomation>
In the script above, 'Extensive Search by Note Class' type search will be carried out the database '"btest\maildbtest.nsf'. As shown in the SetParam child actions, only Form-type designs modified after Aug 5, 2013 will be selected and placed in a newly created My Selection folder called "Selected Designs".