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 UNIDSearch by NoteIDSearch by NoteID RangeSearch Design element by TitleSearch by FormulaQuick Retrieve Contents of View or FolderFull Text SearchExtensive Search by Note Class).


    image2022-8-22_16-32-7.png


    Tag Attributes

    Attributes

    Attribute Value

    Value Description

    Type

    UNID

    NoteID

    NoteIDRange

    DesignTitle

    Formula

    QuickRetrieve

    FullText

    NotesClass

    N/A - Required

    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

    EnterID

    UNIDs to search—multiple UNIDs should be separated with a semicolon.

    N/A

    PutSearchInSelType

    Create
    Append
    Replace

    N/A

    PutSearchInCreateName

    User definable

    Name of the My Selection folder to be created Not Required: 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

    N/A

    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 Scripts

    XML
    <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>
    


    XML
    <ytriaAutomation>
    	<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

    EnterID

    NoteIDs to search in the currently opened database - multiple NoteIDs should be separated with a semicolon.

    N/A

    PutSearchInSelType

    Create
    Append
    Replace

    N/A

    PutSearchInCreateName

    User definable

    Name of the My Selection folder to be created Not Required: 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

    N/A

    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
    <ytriaAutomation>
    	<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

    EnterFirstID

    User definable

    First NoteID in the range to search - Required

    EnterSecondID

    User definable

    Last NoteID in the range to search - Required

    ShowEveryID

    True / False

    Checkbox state of the ‘Show Every NoteID for a Given Document’

    PutSearchInSelType

    Create
    Append
    Replace

    N/A

    PutSearchInSelCreateName

    User definable

    Name of the My Selection folder to be created - Not Required: 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

    N/A

    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
    <ytriaAutomation>
    	<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 done 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 Name

    Compatible Field Values

    Value Description

    DesignElemType

    User definable

    The string to select in the combo, or the index # of the combo as determined by the order they appear in ‘Design Element Type:’ dropdown list Required: The index number of "All" = 0.

    DesignElemTitle

    User definable

    Title of the design element

    PublicNotes

    True / False

    N/A

    PrivateNotes

    True / False

    N/A

    PutSearchInSelType

    Create

    Append

    Replace

    N/A

    PutSearchInSelCreateName

    User definable

    Name of the My Selection folder to be created Not Required: 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

    N/A

    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
    <ytriaAutomation>
    	<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 done on the database “dbtest\maildbtest.nsf”. The specified design element titled “Main” will be selected and placed into a new My Selection folder 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 Name

    Compatible Field Values

    Value Description

    SetFormula

    User definable

    The formula to use to conduct the search - Required: 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

    N/A

    PutSearchInSelCreateName

    User definable

    Name of the My Selection folder to be created Not Required: 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

    N/A

    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
    <ytriaAutomation>
    	<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 Name

    Compatible Field Values

    Value Description

    Show

    Name

    Alias

    NameAlias

    The radio button (in the UI dialog) to select for name and alias display Required: 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

    N/A

    PutSearchInSelCreateName

    User definable

    Name for My Selection folder to be created Not Required: 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

    N/A

    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
    <ytriaAutomation>
    	<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 Name

    Compatible Field Values

    Value Description

    SearchFor

    User definable

    The text to search for

    WordVariant

    True / False

    N/A

    Fuzzy

    True / False

    N/A

    PutSearchInSelType

    Create

    Append

    Replace

    N/A

    PutSearchInSelCreateName

    User definable

    Name for My Selection folder to be created - Not Required: 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

    N/A

    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
    <ytriaAutomation>
    	<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 in 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

    NonDeleteNotes

    True / False

    N/A

    Documents

    True / False

    N/A

    Form

    True / False

    N/A

    View

    True / False

    N/A

    Filter

    True / False

    N/A

    Field

    True / False

    N/A

    ReplicationFormula

    True / False

    N/A

    PrivateDesign

    True / False

    N/A

    DeletionStubs

    True / False

    N/A

    ModifiedAfter

    True / False

    N/A

    ModifiedAfterDate

    True / False

    N/A https://www2.ytria.com/icons/ecblank.gif

    PutSearchInSelType

    Create
    Append
    Replace

    N/A

    PutSearchInCreateName

    User definable

    Name for My Selection folder to be created Not Required: 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

    N/A

    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
    <ytriaAutomation>
    	<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".