UiPath Documentation
maestro
latest
false
Maestro Orchestrate user guide

Transform

Apply several operations to a list in one node: filter it, reshape each item, group the items, or run your own JavaScript.

Transform applies a chain of operations to a list in one node. Each operation receives the result of the one before it, so you can, for example, keep only the open orders, reshape each one, then group them by customer. It's in the Data category of the Add node panel.

When you need only one operation, use its own node instead: Filter, Map, or Group by.

Set up the node​

  1. Select + on the handle of the node it follows, then select Data > Transform.

  2. In the properties panel, select Edit transformation.

  3. In Collection, enter the list to transform, for example $vars.scriptTask1.output. The field expects an array.

  4. Add the operations, in the order they should run:

    OperationWhat it does
    Add FilterReturns only the items that match the conditions you set.
    Add MapTurns each item into a new shape, with the field mappings you define.
    Add Group ByGroups the items by a field, and computes a count, sum, or average for each group.
    Add Custom ScriptRuns your own transformation logic in JavaScript.
  5. Select Run to test the node, and check the result in the Output column.

Output​

The node returns the result of the last operation as output. Later nodes read it as $vars.<nodeId>.output, for example $vars.transform1.output.

Transform or Script​

Use Transform when the work is filtering, reshaping, or grouping a list. Use Script when the logic doesn't fit these operations. Within Transform, Add Custom Script covers a single step that needs code.

Common issues​

IssueResolution
Collection shows an errorThe field is required, and it expects an array. Check the value in the execution trace of the node that produces it.
The output is empty after a filterThe conditions don't match any items. Check the field names and values of the input in the execution trace.
The output has undefined fields after a mapThe source field doesn't exist in the input items. Check the input structure in the execution trace.

Next steps​

  • Set up the node​
  • Output​
  • Transform or Script​
  • Common issues​
  • Next steps​

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated