---
schema_version: "1"
id: b436e7edc1d2aa1351d5cf71ce9e0a23446fe6dd96d3e31adf7289bb1afadd7d
title: Guidelines for Accessing Formula Element Data in Repeatable Blocks (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_evaluating_elements_in_repeatable_blocks_formula.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_evaluating_elements_in_repeatable_blocks_formula.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3ea155375bd4ad3899c6ae6745291ad813e50de0c86278bba796cad9b22e3ea6
description: For the managed package runtime, when you use a Formula element within a repeatable block, review guidelines and examples for accessing data within or outside the same repeatable block.
products:
  - Omnistudio
release: "264"
---
# Guidelines for Accessing Formula Element Data in Repeatable Blocks (Managed Package)

For the managed package runtime, when you use a Formula element within a repeatable block, review guidelines and examples for accessing data within or outside the same repeatable block.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

## Guidelines

Within a repeatable block containing a Formula element, access the data in another element by referencing the element in the Formula element’s Expression property. Use these guidelines:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d178397e55">Location of Data</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d178397e58">How to Access the Data</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Location of Data" class="slds-cell-wrap" style="vertical-align:top;" headers="d178397e55 ">Different element inside the same repeatable block</td>

            <td data-label="How to Access the Data" class="slds-cell-wrap" style="vertical-align:top;" headers="d178397e58 ">
              <p>In the Expression property of the Formula element, enter <code>BlockName|n:ElementName</code>.</p>
              <p style="margin-bottom:0;">When the
                Omniscript runs, it accesses only the elements in the current
                block.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Location of Data" class="slds-cell-wrap" style="vertical-align:top;" headers="d178397e55 ">Different repeatable block</td>

            <td data-label="How to Access the Data" class="slds-cell-wrap" style="vertical-align:top;" headers="d178397e58 ">In the Expression property of the Formula element, enter <code>BlockName|1:ElementName</code> (where the number
              after <code>BlockName|</code> is the block’s count
              in the Omniscript).</td>

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

![Example 1: Formula Element That Accesses Data Within the Same Block](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_example.png)

Example 1: Formula Element That Accesses Data Within the Same Block In this example, a Formula element references data from another element within the same repeatable Block element. The unlabeled block is repeatable (1).

![Omniscript design for summer camp enrollment form, with an unlabeled block element (1) containing Name, Birthday, and Age fields](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex1_01_vlocity.png)

In the properties for the unlabeled block, Enable Repeat is selected. (Edit Block elements are automatically repeatable.)

![Properties panel for block named blockUnlabeled, with Enable Repeat option selected](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex1_02_vlocity.png)

Properties for the Name element.

![Properties panel for the Name element in the summer camp enrollment form](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex1_03_vlocity.png)

Properties for the Birthday element.

![Properties panel for the Birthday element in the summer camp enrollment form](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex1_04_vlocity.png)

Properties for the Age (Formula) element include the formula `AGE(%blockUnlabeled|n:childBirthday%)`.

![Properties panel for the Age element in the summer camp enrollment form, with a formula in the Expression property](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex1_05_vlocity.png)

Preview shows the repeating Formula element calculation as each child’s age.

![Preview of the summer camp enrollment form with two entries, with Name, Birthday, and Age fields for each child](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex1_06_vlocity.png)

![Example 2: Formula Element That Accesses Data in a Different
Block](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_example.png)

Example 2: Formula Element That Accesses Data in a Different Block

In this example, the Formula element Total references the data from the Age element, which is in a different repeatable block.

![Omniscript design for summer camp enrollment form, with Name, Birthday, and Age plus a Formula element labeled Children Under 5. An arrow points from Children Under 5 to the Age element.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex2_01_vlocity.png)

The properties for the block and elements within Child Information are the same as in Example 1.

In the properties for the Formula element Total, the formula `COUNTIF(%childAge%, <5)` references the Age element in the previous block.

![Properties panel of the Formula element Total, with the formula in the Expression property](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex2_02_vlocity.png)

Preview shows the total entries that meet the criterion in the formula, by using data from the Age element.

![Preview of the summer camp enrollment form with entries for two children and the total number of children under 5](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/repeatable_block_ex2_03_vlocity.png)