---
schema_version: "1"
id: e581909d69b1fa93ce6c184bc553fceb26421bc9d12f08b91b75ebb5ad5cf158
title: Persist Local List Variable Values to a Context Instance
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/bre_persist_local_list_variables_to_context.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.bre_persist_local_list_variables_to_context.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a22c7266ee6dbf6c33d5fc949b003d9c280f28a7bdafb5e68c5af78653c9f13f
description: Local list variables store temporary values in an expression set version that do not automatically pass back to a context instance. However, you can write these values back to the context instance by creating an explicit assignment to a standard context tag.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Persist Local List Variable Values to a Context Instance

Local list variables store temporary values in an expression set version that do not automatically pass back to a context instance. However, you can write these values back to the context instance by creating an explicit assignment to a standard context tag.

### Required Editions

- The expression set must be associated with an active context definition.
- The local list variable and the target context tag must have matching data types.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions for clouds that have Business Rules Engine enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d13290e86">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d13290e86 ">To create an expression set that uses a context definition:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d13290e86 ">Rule Engine</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d13290e86 ">To use the definition’s tags as local list variables in the expression set’s version
              steps:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d13290e86 ">Rule Engine</td>

          </tr>
        </tbody>
      </table>

1. Ensure your local list variable is placed as a child of a standard context node.
2. Identify a sibling context tag to be used for writing the value back to the context instance.
    
    Use an existing standard context attribute (context tag) that is a sibling to the local list variable under the same parent node.
3. In the expression set version, add a Calculation step at the point where you want to persist a value to a context instance.
4. In the calculation step, assign the standard context tag (LHS) to the local list variable (RHS).
    
    Example: Context\_Tag\_Attribute = My\_Local\_List\_Variable

During runtime, the value of the local list variable is assigned to the context tag.

Once execution is complete, these values are written back to the context instance for that specific node and attribute.