Text Lookup

Verb: lookupCommand

Available from: <Enterprise>

Looks up for a specific text in a text collection or data table, using as basis for comparison an algorithm such as "Soundex" or "Fuzzy".

Syntax

lookupCommand --culture(Culture) --source(LookupOptions) --algorithm(TextSearchAlgorithms) --soundexalgorithm(Nullable<SoundExAlgorithms>) --fuzzyalgorithm(Nullable<FuzzyStringComparisonAlgorithms>) --tolerance(Nullable<FuzzyStringComparisonTolerance>) --sourceCollection(ICollection<String>) --sourcedatatable(DataTable) [--usecolumnname(Boolean)] --index(Numeric) --name(String) --text(String) (String)=value (Numeric)=index (Boolean)=success

Inputs

Script Designer Required AcceptedTypes Description
--culture Language Required Culture Language of the text inserted in the Text parameter and the Data Source. The options are:
  • en-US
  • pt-BR
  • pt-PT
  • --source Data Source Required LookupOptions Source of data to be compared with the text inserted in the Text parameter. The options are:
  • Collection
  • Data Table
  • --algorithm Algorithm Required TextSearchAlgorithms Algorithm used to search and compare the text in the specified Data Source. The options are:
  • Fuzzy
  • Soundex
  • --soundexalgorithm Soundex Algorithm Only whenAlgorithm is Soundex SoundExAlgorithms "Soundex" algorithm used to search for the text in the specified Data Source. There are the following options:
  • Fonetico
  • KnuthEd2
  • Metaphone
  • Miracode
  • Simplified
  • SQLServer
  • --fuzzyalgorithm Fuzzy Algorithm Only whenAlgorithm is Fuzzy FuzzyStringComparisonAlgorithms "Fuzzy" algorithm used to search for the text in the specified Data Source, with the following options:
  • Dice Coefficient
  • Hamming Distance
  • Jaccard Distance
  • Jaro Distance
  • Jaro Winkler Distance
  • Levenshtein Distance
  • Longest Common Subsequence
  • Longest Common Substring
  • Overlap Coefficient
  • Ratcliff Obershelp Similarity
  • Sorensen Dice Distance
  • Tanimoto Coefficient
  • --tolerance Tolerance Only whenAlgorithm is Fuzzy FuzzyStringComparisonTolerance Degree of similarity of the text inserted in the Text parameter with those in the Data Source parameter. The options are:
  • Manual
  • Normal
  • Strong
  • Weak
  • This parameter is used in conjunction with the type of Fuzzy defined to perform the search.
    --sourceCollection Text Collection Only whenData Source is Collection ICollection<Text> Collection in which the text inserted in the Text parameter will be fetched.
    --sourcedatatable Data Table Only whenData Source is DataTable Data Table Data table in which the Text is fetched.
    --usecolumnname Use Column Name Optional Boolean When enabled, it allows the column name to be used as a reference to search for the text inserted in the Text parameter.
    --index Index Only whenUse Column Name is False Number Index corresponding to the data table row, in which the text inserted in the Text parameter will be searched.
    --name Name Only whenUse Column Name is True Text Column name in Data Table, where the Text is fetched.
    --text Text Required Text Text to be searched for in the Data Source.

    Outputs

    Script Designer AcceptedTypes Description
    value Text Found Text Returns the text found in the Data Source.
    index Index Number Returns the position where the specified Text is found in the Data Source.
    success Success Boolean Returns "True", if the text from the Text parameter is found in the Data Source, or "False" if otherwise.

    Example

    The language is set to Português (Brasil) to search for the word "Text" in Text Collection, using the option Fonetico for the Soundex algorithm. In addition, the Log Message command registers the return of the output parameters Index, Success and Text Found on the IBM RPA Studio console.

    defVar --name textList --type List --innertype String --value "[Example,Text,Collection]"
    defVar --name foundText --type String
    defVar --name textIndex --type Numeric
    defVar --name executionResult --type Boolean
    lookupCommand --culture pt-BR --source "Collection" --algorithm "Soundex" --soundexalgorithm "Fonetico" --sourceCollection ${textList} --text Text foundText=value textIndex=index executionResult=success
    logMessage --message "Text: ${foundText}\r\nIndex: ${textIndex}\r\nResult: ${executionResult}" --type "Info"
    // Text: Text
    // Index: 2
    // Result: True
    

    Remarks

    In this current version of IBM RPA Studio, the specified command is not supported using English (United States) or Portuguese (Portugal). Future versions will offer support.

    See Also

  • Approximately Equal
  • Soundex