UiPath Documentation
maestro
latest
false
Guide de l'utilisateur de Maestro Orchestrate
Important :
La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

Transformer

Appliquez plusieurs opérations à une liste dans un seul nœud: la filtrer, reformuler chaque élément, regrouper les éléments ou exécuter votre propre 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.

Configurer le nœud​

  1. Sélectionnez + sur le handle du nœud qu’il suit, puis sélectionnez Données > Transformer.

  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. Ajoutez les opérations, dans l'ordre dans lequel elles doivent s'exécuter:

    Opération (Operation)Ce qu’il fait
    Ajouter un filtreReturns only the items that match the conditions you set.
    Add MapTurns each item into a new shape, with the field mappings you define.
    Ajouter un groupe parGroups 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.

Sortie​

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​

Utilisez la fonction Transformer lorsque le travail filtre, reforme ou regroupe une liste. Utilisez Script lorsque la logique ne correspond pas à ces opérations. Dans la transformation, l'activité Ajouter un script personnalisé couvre une seule étape qui a besoin de code.

Problèmes couramment rencontrés​

ProblèmeRésolution
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.
La sortie est vide après un filtreThe conditions don't match any items. Check the field names and values of the input in the execution trace.
La sortie contient des champs undefined après une carteThe source field doesn't exist in the input items. Check the input structure in the execution trace.

Prochaines étapes​

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour