Use the Compare component

task australia Updated Sep 10, 2026 1 min read use-stringutil-compare.md
Raw file servicenow.com

Compare two string objects that are based on their ASCII values by using the Compare component in RPA Desktop Design Studio.

Before you begin

Role required: none

About this task

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.

Procedure

  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 ([Omitted image "add-image-icon.png"] Alt text: Plus icon.) to add the string options from the Comparison Options drop-down list.

    For example, select the following options.

    [Omitted image "compare-options-rpa.png"] Alt text: 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.

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.

[Omitted image "compare-text-messagebox-rpa.png"] Alt text: Compare component with text and comparison options, after running this component, the output is displayed using MessageBox component.

Data In

String

6. To test the component, under the **DESIGN** tab, click **Run**.

Parent Topic:String utilities

Search documentation
Search document titles and file paths on the australia branch