---
schema_version: "1"
id: b62774d3a989940ff7380a4d59cd3953f78aac44d315d66dbdcd129d17b8c97e
title: Prefill Repeatable Blocks
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_21959.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_prefill_repeatable_blocks_21959.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a95e011c1685aab984121a24966f6a6f0cd3278a747acf79d64213f5348f0032
description: Prefill repeatable blocks with data by passing data to the block in an array format.
products:
  - Omnistudio
release: "264"
---
# Prefill Repeatable Blocks

Prefill repeatable blocks with data by passing data to the block in an array format.

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.

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-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/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.
    
    ![A step with an edit block that has two text input elements](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/omnistudio/images/prefill_editblock_element.png)
    
    The edit block example has a JSON array.
    
    ```
    "EditBlock1": [
          {
            "FirstName": "John",
            "LastName": "Smith"
          },
          {
            "FirstName": "Jane",
            "LastName": "Smith"
          }
        ]
    ```
9. To convert back to the default view of the Set Values Action, click **Edit in Property Editor**.
    
    ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/omnistudio/images/os_edit_block_map.png)
10. Preview the Omniscript to view the nested data in the Omniscript's data JSON.
    
    ![An Omniscript preview that shows John Smith and Jane Smith for the edit block](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/omnistudio/images/os_prefill_edit_block.png)