Swap

This function allows to swap two dimensions and can be used both in the input and output part of an assignment.

The syntax is:

Swap(,)

When used in the input expression of an assignment, the system swaps the codes of the two dimensions having the same effect of the Copy one dimension to another function performed twice.

If a filter is present on one (or both) of the involved dimensions, it is applied on the swapped dimensions (e.g. if the user swaps Entity and EntityCtp, the filter on entity is applied on the counterpart).

When Swap is used in the output expression of the assignment, the system:

  • Deletes every row on the target table (the dimensions are swapped even when applying a filter);
  • During the compensation amount calculation all existing records are read swapping the dimensions.