Autoselect all fields of a table

There are 2 generic approaches for applying the same calculation to all fields:

Unpivoting / repivoting

In this case you unpivot the table so that all columns become 1 column (this may produce a very long table). Then you perform the calculation and pivot it back.

Pros: simple method
Cons: doesn’t work on large tables because unpivoting can produce a too long table, restoring column order requires an additional workaround (appending to an empty table)

The “Iterate columns” action.

The “Iterate columns” action is intended for processing all or selected columns in a similar fashion one by one. It’s a bit tricky to setup (probably the most complex action in EasyMorph), but is very versatile. See an example here: How to use iterate column action

It is recommended to upgrade to v4.3 or later. It this version, the “Input” action (required when “Iterate columns” is used) has a button for automatically populating the input dataset, which is not so trivial in earlier versions.

Pros: possible to process very large tables, any calculation logic can be applied
Cons: non-trivial to learn and configure

1 Like