---
schema_version: "1"
id: 290a4db741fbefdd03a6097ed322cc0c6e77f4aadbc845391eb116fc077ed4cb
title: Prefill 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_prefill_repeatable_blocks.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_prefill_repeatable_blocks.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dd39c88569aff37dbbdab317b656dd16f00e81da13e7b56ee41f8baf6863b17a
description: For the managed package runtime, prefill repeatable blocks with data by passing data to the block in an array format.
products:
  - Omnistudio
release: "264"
---
# Prefill Repeatable Blocks (Managed Package)

For the managed package runtime, prefill repeatable blocks with data by passing data to the block in an array format.

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

The data's root node name must match the name of the block element. The fields within each array instance of the data JSON node must match the name of an element within the block. Prefill data into repeatable blocks with Actions by returning data that matches the block's element name and the element's within the block using an array format.

Beginning with Vlocity Insurance and Health Winter '20 and Vlocity CME Winter '20, LWC Omniscripts support prefilling repeatable blocks.

Data JSON array format example:

```
"EditBlock1": [
      {
        "FirstName": "John",
        "LastName": "Smith"
      },
      {
        "FirstName": "Jane",
        "LastName": "Smith"
      }
    ]
```

To map Data JSON to a Repeatable Block with a Set Values action:

1. Add a Block or Edit Block to the Omniscript.
2. (Optional) When using a Block, check the Block's **Repeat** checkbox property.
    
    ![Note](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_note.png)
    
    Note
    
    Edit Blocks are inherently repeatable because they store entry values in an array format.
3. Add Input elements to the Block.
4. Add a **Set Values Action** to the Omniscript.
5. In the Set Values Action, click **Add New Value**.
6. In the **Element Name** field, enter the name of your block element.
7. Click **Edit as JSON** in the Set Values Action element to edit the JSON directly.
8. In the **elementValueMap** JSON node, locate the block element's JSON node, and enter an array of data. For example, to prefill two Text input elements in an Edit Block element, add an array that maps to the elements in the block.
    
    Edit Block Element configuration:
    
    ![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/prefill_editblock_element.png)
    
    JSON Array:
    
    ```
    "EditBlock1": [
          {
            "FirstName": "John",
            "LastName": "Smith"
          },
          {
            "FirstName": "Jane",
            "LastName": "Smith"
          }
        ]
    ```
9. Click **Edit in Property Editor** to convert back to the default view of the Set Values Action.
    
    ![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/os_edit_block_map.png)
10. Preview the Omniscript to view the nested data in the Omniscript's data JSON.
    
    ![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/os_prefill_edit_block.png)