Search Documents/Designs

Tag: 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

AttributesAttribute ValueValue DescriptionComment
TypeUNID

NoteID

NoteIDRange

DesignTitle

Formula

QuickRetrieve

FullText

NotesClass

N/A

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 NameCompatible Field ValuesValue DescriptionComment
EnterIDUNIDs to search—multiple UNIDs should be separated with a semicolon.

N/A

N/A

PutSearchInSelTypeCreate
Append
Replace

N/A

N/A

PutSearchInCreateNameUser definableName 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.
PutSearchInSelAppendNameUser definableName of the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault
Field
Formula
Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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 NameCompatible Field ValuesValue DescriptionComment
EnterIDNoteIDs to search in the currently opened database—multiple NoteIDs should be separated with a semicolon.

N/A

N/A

PutSearchInSelTypeCreate
Append
Replace

N/A

N/A

PutSearchInCreateNameUser definableName of the My Selection folder to be createdNot Mandatory: If no name is specified, the default name will be used. Default name is language specific.
PutSearchInSelAppendNameUser definableName of the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault
Field
Formula
Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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 NameCompatible Field ValuesValue DescriptionComment
EnterFirstIDUser definableFirst NoteID in the range to searchMandatory
EnterSecondIDUser definableLast NoteID in the range to searchMandatory
ShowEveryIDTrue/FalseCheckbox state of the ‘Show Every NoteID for a Given Document’

N/A

PutSearchInSelTypeCreate
Append
Replace

N/A

N/A

PutSearchInSelCreateNameUser definableName of the My Selection folder to be createdNot Mandatory: If no name is specified, the default name will be used. Default name is language specific.
PutSearchInSelAppendNameUser definableName of the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault
Field
Formula
Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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>


Type: 
DesignTitle 

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.

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

Field NameCompatible Field ValuesValue DescriptionComment
DesignElemTypeUser definableThe string to select in the combo, or the index # of the combo as determined by the order they appear in ‘Design Element Type:’ dropdown listMandatory: The index number of "All" = 0.
DesignElemTitleUser definableTitle of the design element

N/A

PublicNotesTrue/False

N/A

N/A

PrivateNotesTrue/False

N/A

N/A

PutSearchInSelTypeCreate

Append

Replace

N/A

N/A

PutSearchInSelCreateNameUser definableName of the My Selection folder to be createdNot Mandatory: If no name is specified, the default name will be used. Default name is language specific.
PutSearchInSelAppendNameUser definableName of the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault

Field

Formula

Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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="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>


Type: 
Formula 

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”.

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 NameCompatible Field ValuesValue DescriptionComment
SetFormulaUser definableThe formula to use to conduct the searchMandatory: Formulas must be “escaped” using the standard HTML markup.
SearchDocumentsTrue/ FalseTrue will search all documents, false will not

N/A

SearchDesignsTrue/ FalseTrue will search all design elements, false will not

N/A

PutSearchInSelTypeCreate
Append
Replace

N/A

N/A

PutSearchInSelCreateNameUser definableName of the My Selection folder to be createdNot Mandatory: If no name is specified, the default name will be used. Default name is language specific.
PutSearchInSelAppendNameUser definableName of the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName of the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault
Field
Formula
Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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>


Type: 
QuickRetrieve 

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”.

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 NameCompatible Field ValuesValue DescriptionComment
ShowName

Alias

NameAlias

The radio button (in the UI dialog) to select for name and alias displayMandatory: This will change the format necessary for value of the field "ViewFolderList".
ViewFolderListUser definableThe name and/or alias as would be shown in the View/Folder list depending on the value of the field "Show"

N/A

PutSearchInSelTypeCreate

Append

Replace

N/A

N/A

PutSearchInSelCreateNameUser definableName 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.
PutSearchInSelAppendNameUser definableName for the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName for the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault

Field

Formula

Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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

Field NameCompatible Field ValuesValue DescriptionComment
SearchForUser definableThe text to search for

N/A

WordVariantTrue/ False

N/A

N/A

FuzzyTrue/ False

N/A

N/A

PutSearchInSelTypeCreate

Append

Replace

N/A

N/A

PutSearchInSelCreateNameUser definableName 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.
PutSearchInSelAppendNameUser definableName for the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName for the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault

Field

Formula

Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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="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 NameCompatible Field ValuesValue DescriptionComment
NonDeleteNotesTrue/False

N/A

N/A

DocumentsTrue/False

N/A

N/A

FormTrue/False

N/A

N/A

ViewTrue/False

N/A

N/A

FilterTrue/False

N/A

N/A

FieldTrue/False

N/A

N/A

ReplicationFormulaTrue/False

N/A

N/A

PrivateDesignTrue/False

N/A

N/A

DeletionStubsTrue/False

N/A

N/A

ModifiedAfterTrue/False

N/A

N/A

ModifiedAfterDateTrue/False

N/A

N/A

PutSearchInSelTypeCreate
Append
Replace

N/A

N/A

PutSearchInCreateNameUser definableName 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.
PutSearchInSelAppendNameUser definableName for the My Selection folder the data will be appended to

N/A

PutSearchInSelReplaceNameUser definableName for the My Selection folder whose current UNIDs will be replaced in favor of the new ones found

N/A

TitleOptionTypeDefault
Field
Formula
Column

N/A

N/A

TitleOptionFieldNameUser definableDocument field nameTo be used with TitleOptionType=”Field”
TitleOptionFormulaUser definableFormula to be usedTo be used with TitleOptionType=”Formula”
TitleOptionColumnNameUser definableView name coupled with a column name, separated by a colonTo 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".