Compare

The Compare component compares two string objects based on their ASCII values.

ScreenShot

Supported Functions

Double Click on the Compare component title bar to open the CONFIGURATION Window.

ScreenShot

Ports

The Compare component exposes the Control In, Control Out, Data In, and Data Out ports by default.

Port Description
ControlIn Must be connected to the Control Out port of one or more components.
ControlOut Can be connected to the Control In port of another component or the default end component.
Compare can be connected to to another component.
Data In Specifies the text to compare.

Properties

To edit the properties of the Compare component, in the Properties window, change the required property. You can edit the following properties.

Property Description
Search Search for the respective property.
Delay After Execution Specifies the wait time (in seconds) after the action is performed.
Delay Before Execution Specifies the wait time (in seconds) before the action is performed.

Example

Let us consider an example.

ScreenShot

To compare the ASCII values of two strings:

  1. In the Toolbox, expand Utilities and then expand String Utilities.

  2. Drag the Compare component and drop it on the Design surface.

  3. Expand the General category and drag the Variable component.

  4. Double click on variable and enter the first string.

  5. Double-click on title bar of Compare component, click on ScreenShot icon.

    ScreenShot

  6. Select the Comparision Options from dropdown list and give the second string.

    ScreenShot

  7. To display the returned value:

    • Expand the MessageBox component, drag the Show component and drop it on the Design surface.
  8. Connect the control ports and data ports in the activity.

  9. In the toolbar, click Run.

    • If both the strings have Equal value, then control goto Compare port and then display the MessageBox.

      ScreenShot

    • If both string are not Equal, then control goto to End.