Show TOC

Applying Quick Fixes in Data Mappings and ExpressionsLocate this document in the navigation structure

Use

You can solve several types of errors in data mappings and expressions by applying a quick fix. You can apply a quick fix on the following errors:

  • Difference between data types

    The difference may occur between source and target mapping nodes, or when the return type of an expression is different from the expected type, or when a function requires a parameter of specific data type. In all these cases, you can apply a quick fix to process one data type as another with the cast as function.

  • Errors caused by deleted data mappings

Procedure

Applying the Quick Fix for Different Data Types

You can apply this quick fix if you want, for example, to define mapping between source and target nodes with different data types. The quick fix enables the source node data type to be processed as the target node data type with the cast as function.

  1. Define the data mapping between the source and target nodes which have different data types.

    A function icon with an error marker appears on the mapping line.

  2. Double-click the function icon with the error marker to open the expression editor.

  3. Click the expression and press CTRL + 1 .

    The expression editor offers to cast the source data type as the target data type.

  4. Double-click the entry suggested by the expression editor to enable the quick fix and choose the OK pushbutton.

Note

If you have used the cast as function unnecessarily for equal data types that do not require an explicit cast, you can also apply a quick fix to remove the cast. To do that, repeat the above steps and select Remove "cast as" operator entry.

A quick fix for removing an unnecessarily written selector for the current node is also available.

Applying the Quick Fix for Deleted Data Mappings

You can apply this quick fix in case you want to restore partially deleted data mappings, which cause parts of the expression defining how the mapping is done to be deleted as well. The quick fix is applicable only if other mapping, which is also part of the expression still exists.

  1. Define the data mapping between the source and target nodes that consists of more than one mapping line.

  2. Delete one or more mapping lines but leave at least one.

    An error marker appears on the function icon on the mapping line.

  3. Double-click the function icon with the error marker to open the expression editor.

    The deleted mappings are crossed off in the expression.

  4. Click the crossed off part of the expression that you want to restore and press CTRL + 1 .

  5. Double-click Use this entry suggested by the expression editor and choose the OK pushbutton.

    The crossed off parts of the expression are restored as well as the respective deleted mappings.