---
schema_version: "1"
id: 3f7c7e4b8d8eb37fe311a42eb201abb8314114f0158a04db829ced032d543dbe
title: Work with Formulas in Edit Block (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_work_with_formulas_in_edit_block.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_work_with_formulas_in_edit_block.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c92cbf6184c34d59a4ce536bf7dc8d542e8ff99d197df599ab69368afae12ee1
description: For the managed package runtime, perform equations and combine strings by using Formula Elements. Place formulas within an Edit Block to access element values within a specific Edit Block entry.
products:
  - Omnistudio
release: "264"
---
# Work with Formulas in Edit Block (Managed Package)

For the managed package runtime, perform equations and combine strings by using Formula Elements. Place formulas within an Edit Block to access element values within a specific Edit Block entry.

![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).

Place Formula outside of the Edit Block in the same Step to access an element value for all of the Edit Block entries.

1. To access data within a specific Edit Block entry:
    1. Add a Formula element to the Edit Block.
    2. Using the merge field syntax, add the Edit Block's Element Name and the Element Name for the element you want to access in the Formula. For example, %EditBlock:FirstName%. For more information on merge fields, see [Access Omniscript Data JSON with Merge Fields (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_access_omniscript_data_json_with_merge_fields.htm&release=264.0.0&type=5 "For the managed package runtime, enable Omniscript elements and element properties to access data JSON using merge fields. A merge field is a variable that references the value of a JSON node. For example, if a JSON node is \"FirstName\": \"John\", then the merge field %FirstName% returns John.").
    3. Add a |n after the Edit Block element name to set the formula to only access the merge field's value for its instance. Using the |n syntax is necessary because the Edit Block stores entry values in an array format. The resulting syntax is %EditBlock|n:FirstName%.
    4. Concatenate values by combining them using the |n syntax. For example, %EditBlock|n:FirstName% + " " + %EditBlock|n:LastName%.
        
        ![image](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/oseditblockexample.gif)
2. To access each index of an Edit Block array in a formula:
    1. Place a Formula outside of the Edit Block.
    2. In the Formula editor, add the Element Name using the merge field syntax. For example, to return the sum of all the entries for a Number element in an Edit Block, you would use the following syntax in the formula editor: SUM(%EditBlock1:NetIncome%), where NetIncome is the name of a Number element.
    3. (Optional) When using the vlcEditBlockFS.html template, display the formula at the top of the Edit Block by adding the Formula element's name to the Edit Block's **Sum Element** property.