Skip to main content
Version: 7.9

Diff Component

Description

The Diff Page Builder component allows you to compare table records stored in the Resolve Actions Pro database. An optional features is to load one of the compared files in a Form component. The Diff component is suitable for configuration change management. It is included in the Data & Form category.

The component only supports plain-text data such as strings, numbers, JSON files, XML files, and so on.

See Page Builder to learn how to add the component.

Configuration

You can configure the following fields when you add the Diff component to a page:

  • Table Name—Select the Actions Pro database table that contains the rows that you want to compare. See ::title to learn how to manage tables.
  • Columns—Select one or more of the table columns to display on the Page. This data display is required when using the Diff component for selecting rows to compare. For tables with many columns, this option allows you to design a more manageable data display. Although not enforced, it is a good practice to include the column you will be comparing.
  • Compare To—Select the column storing the data that you want to compare.
    The component allows to compare a pair of the column's rows.
  • Save output as variable—Aids passing data to forms that you might be having on the Page. If checked, this option automatically creates a variable for the diff result using the column name as the variable name.
    All forms on the Page will have access to the variable. Form fields with the same name as the variable will automatically populate with the data.
  • Filter—Build a filter to narrow down the number of rows that will be available for comparison.
    • On the left, select a column to filter on.
    • On the right, enter a value to match the column to.
      The matching is done using the like operator. Enter either an explicit value or a variable reference from the Automation's PARAM map.

Interoperability with Forms

The Diff component was designed to be used in conjunction with the Form component but can also be used independently. The Diff component includes a button that sends the comparison result to the form on press.

Take the following considerations into account when creating the form to attach to the Form component:

  • For Type, select Input.
  • Ensure that the form includes a field of a suitable type (such as Paragraph Text if you are comparing configuration files) and set its Field Name property to the name of the table column that you are comparing.

Usage

When working with a Page that includes the Diff component, take these steps to compare two table rows:

  1. Click anywhere inside the Side A panel to select it.
  2. In the table view below the panels, click the base row that you want to compare.
    The row content appears in the panel.
  3. Click anywhere inside the Side B panel to select it.
  4. In the table view below the panels, click the row that you want to compare to the base row.
    The row content appears in the panel.

The differences between the two values appear immediately:

  • Added lines appear in green.
  • Removed lines appear in red.
  • The hatching enables better spacing for easier visual comparison.

If you have set up a form on the Page, and you have enabled the Diff component's Save output as variable option, you can populate Side A or Side B onto the form:

  • To populate the content of Side A, click anywhere inside it and then click Populate.
  • To populate the content of Side B, click anywhere inside it and then click Populate.