Conditional updating

The Conditional Update action allows you to set the value of a single new or existing field by using calculated expressions based on logical conditions being met.

  • The field is updated with the result of each then expression when the condition is met
  • Define the value of new or existing fields by typing the expressions or using the Expression Editor
  • The Else expression defines the default value of the field; i.e., when no condition is met

On the Configuration tab:

  1. Use the Table Fields to identify the target field and to build filter and conditional update expression.

  2. Open the filter area to create a filter limiting the affected records.

  3. Drag from Table Fields to identify the target field for update.

  4. Build the expression for the condition.

  5. Build the expression for the value update.

  6. Use the icons to add child expressions, remove expressions, and change expression order.

  7. Build the express for the optional "Else" value.

  8. Preview data and SQL statement.

Possible applications include:

  • Set the value of a new or existing field dependent on more than one condition.
  • Apply if-then-else logic to an entire record set.

Conditionally update a field

  1. Drag the Conditional Update icon onto the design surface.
  2. On the Connections tab , enter a Name and a Description to identify the action, then select the database and table containing the field:
    • Database Connection – Select the database in which values are being calculated, or choose New Database Connection to establish a new connection.
    • Table Name – Select the table in which to calculate and update the values.
  3.   On the Configuration tab , specify a target field and build the appropriate expressions (you can use the Expression Editorfor this):
    • To indicate the field being updated, drag an icon from Table Fields into Target Field. Alternatively, you can drag the New Field icon into Target Field, and provide the new target field properties as prompted.
    • Build the two parts of the conditional expression using choices from Table Fields for the When and Then boxes of the Conditional Updates area.
    • Use the icon menu to the right of an expression you have created to manipulate the expression.
      • To add a child expression to an expression that has already been added, select the Add icon , then build the child expression.
      • To remove an expression, select the Remove icon .
      • To move an expression either up or down in the order, click on the appropriate arrow icon, either up or down .
    • To more narrowly define the conditions by which the action is executed, open the Filter area and build the necessary expression using choices from the Table Fields area.
    • Click Preview to view the data or the SQL statement created from this action. Refer to Preview for information.

Conditional Update data example

In the following example, a new field Site Type is added to a Sites table and updated based on the prefix of the site's name:

Last modified: Thursday December 19, 2024

Is this useful?