> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/configuring-virtual-environment-replacements/replacement-cross-reference-lookups.md).

# Replacement cross-reference lookups

## Introduction

Having [chosen to configure cross-reference lookup replacements for a virtual environment](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/configuring-virtual-environment-replacements.md#configuring-replacements-for-a-virtual-environment-version), a new replacement rule is displayed, ready for you to configure:

<figure><img src="/files/5qyI6JzOAiYv1vsskoPJ" alt=""><figcaption></figcaption></figure>

Having defined the first rule, you can add more - you must create one replacement rule for every [cross-reference lookup table](/product-documentation/process-flows/cross-reference-lookups.md) that you need to replace in every process flow that will run in this environment.

## Defining replacement rules for a cross-reference lookup

{% stepper %}
{% step %}
**Select the required ORIGINAL cross-reference lookup**

Use the `original` dropdown list to select the first cross-reference lookup in a 'master' process flow that must be replaced when this process flow runs in the given virtual environment - for example:

<figure><img src="/files/eK9cYZdob0v3nM1VKS0v" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
As you work through your replacement configuration, it's helpful to view related ['master' process flows](/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-master-process-flow.md) in another browser tab. You can duplicate a Patchworks browser tab and navigate to a different page whenever needed.
{% endhint %}
{% endstep %}

{% step %}
**Select the required REPLACEMENT cross-reference lookup**

Use the `replacement` dropdown list to select the replacement cross-reference lookup that must be used when this process flow runs in the given virtual environment - for example:

<div align="left"><figure><img src="/files/uE1GMRLOm3u5ulTUUs7t" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Confirm your selections**

Click the `create` button (associated with this replacement rule) to confirm your selections:

<figure><img src="/files/X51zeycxhiSUB78h1q7u" alt=""><figcaption></figcaption></figure>

The rule is added:

<figure><img src="/files/vZatgYACJ7aSwIDdnMSM" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Once a rule is confirmed, it can't be edited. If you need to change a replacement rule, use the 'trash' icon to remove it and add a new one.
{% endhint %}
{% endstep %}

{% step %}
**Add more replacement rules for cross-reference lookups**

To add another replacement rule for a cross-reference lookup, click the top-right `create` button:

<figure><img src="/files/d3veJekX54d2iUdJyOef" alt=""><figcaption></figcaption></figure>

Update the new rule as required, then click the associated `create` button to confirm your selections:

<figure><img src="/files/SNlZXwntgP06yZizFhFJ" alt=""><figcaption></figcaption></figure>

Repeat as many times as needed to define all required cross-reference lookup replacements for all process flows that will be running in this virtual environment.

{% hint style="info" %}
If you don't want to define ALL cross-reference lookup replacements now, that's OK. For example, you might choose to add the minimum number of replacements needed for [testing](/product-documentation/virtual-environments/implementing-virtual-environments/testing-a-process-flow-against-a-virtual-environment.md), then define remaining rules (in a [new draft](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/understanding-virtual-environment-versions.md)) later, after initial testing is complete.
{% endhint %}
{% endstep %}
{% endstepper %}
