Use the Compare component

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 1 minute de lecture
  • Compare two string objects that are based on their ASCII values by using the Compare component in RPA Desktop Design Studio.

    Avant de commencer

    Role required: none

    Pourquoi et quand exécuter cette tâche

    Compare method is used to compare given text with provided options. If option is matched, it opens the matching control out port.

    You can configure the properties for the Compare component. For more information about these properties, see Properties of the String Utilities components.

    Procédure

    1. In the Toolbox pane, navigate to Utilities > String Utilities.
    2. Drag the Compare component to the Design surface.
    3. In the Compare component, double click the title bar to launch the Configuration editor.
    4. Select the Add icon (Plus icon.) to add the string options from the Comparison Options drop-down list.
      For example, select the following options.
      Figure 1. Comparison options window
      Comparison options selected in the configuration window.
    5. Connect the data and control ports of the Compare component to the corresponding ports of the other components as described in the following table.
      Tableau 1. Compare component parameters
      Name Purpose of connection Port type Data type
      Text Provide text that must be compared with multiple control out ports based on the comparison type.

      For example, if you provide hello welcome as the comparison text, the component compares option 0 and option 1. Since Option 1 starts with hello, it matches with the text provided. Connect this to a MessageBox component to view the output.

      Figure 2. Compare component
      Compare component with text and comparison options, after running this component, the output is displayed using MessageBox component.
      Data In String
    6. Facultatif : To test the component, under the DESIGN tab, click Run.