Using a cross-reference lookup in field transformations


Cross-reference lookups can be applied as a field mapping transformation, using the map function. The steps below show how this is achieved.

The steps

Step 1 Log into the Patchworks dashboard, then select process flows and open the process flow that you want to update.

Step 2 Access settings for the map shape so you can see existing mapping rules - for example:

Step 3 Find the mapping rule that you want to update with a transformation, and click the transform button:

Step 4 Any existing transformations for this mapping rule are shown. Click the add transform button:

Step 5 Click in the name field to activate a dropdown list of all available transform functions, then select the map function from the other section:

Step 6 Click in the map field to activate a dropdown list of available cross-reference lookups, then select the lookup that you'd like to use. For our example, we'll use a lookup that we added previously which maps long-form colours to hex codes:

Step 7 Use the direction field to choose whether this conversion should take place form left to right or right to left:

Step 8 Use the match type field to choose how data to be transformed should be matched:

Step 9 Use the output type field to choose the data type for the transformed value:

Step 9 Click the add field button:

...then confirm the source field to be transformed:

Step 9 Accept changes and the function is confirmed for the mapping rule:

At this point, the cross-reference lookup transformation is ready to use. When you save the map shape and run the process flow, your transformation is applied.

However, if required, you can add more transformation functions for a mapping rule - follow the steps above and choose the appropriate function in step 5.

Looking at our example scenario, it's useful to add a prefix function to add a # character before any colour field values:

To see how this second transform was added, check the video at the start of these steps.

If you add multiple functions, the sequence is important! Looking at our example above, we are transforming the colour field first (so long-form colour names are converted to hex codes) and once that is done, we apply a # (string) prefix to those values.

Step 10 Now when your process flow runs, the transformations are applied:

Last updated