# Nested Flex Repeater - Enable child checkboxes only within the selected row

**URL:** <https://forum.inductiveautomation.com/t/nested-flex-repeater-enable-child-checkboxes-only-within-the-selected-row/116978>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 3, 2026, 7:30am UTC](https://forum.inductiveautomation.com/t/nested-flex-repeater-enable-child-checkboxes-only-within-the-selected-row/116978 "2026-09-03T07:30:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arifrahuman.a1](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@arifrahuman.a1](https://forum.inductiveautomation.com/u/arifrahuman.a1)\
**Post date:** [September 3, 2026, 7:30am UTC](https://forum.inductiveautomation.com/t/nested-flex-repeater-enable-child-checkboxes-only-within-the-selected-row/116978/1 "2026-09-03T07:30:03Z")

</div>

Hi All,

I am working with a nested Flex Repeater structure in Perspective and need some guidance on the best approach.

### Structure

**Level 1 - Checkbox Template**

- Contains a checkbox and label.
- Parameters:
  - `type` (1 = master checkbox, 2 = child checkbox)
  - `value`
  - `enable`

**Level 2 - Row Template**

- Contains a Flex Repeater that uses the Checkbox Template.
- Example row:

```python
[Master Checkbox] [Child Checkbox] [Child Checkbox]

```

The logic here is working correctly:

- When the master checkbox (`type=1`) is checked, the child checkboxes (`type=2`) in that row become enabled.
- When the master checkbox is unchecked, the child checkboxes become disabled.

**Level 3 - Main View**

- Contains another Flex Repeater that uses the Row Template.
- Example:

```python
Row 1 -> [Master] [Child] [Child]
Row 2 -> [Master] [Child] [Child]
Row 3 -> [Master] [Child] [Child]
...

```

### Problem

I am currently using `system.perspective.sendMessage()` and a message handler to enable/disable child checkboxes.

The issue is that when I check the master checkbox in **Row 1** , the child checkboxes in **all rows** become enabled.

Example:

```python
Row 1 Master = Checked
    -> Row 1 Childs Enabled ✅
    -> Row 2 Childs Enabled ❌
    -> Row 3 Childs Enabled ❌

```

### Expected Behaviour

If I check the master checkbox in a specific row:

```python
Row 1 Master = Checked
    -> Row 1 Childs Enabled ✅
    -> Row 2 No Change ✅
    -> Row 3 No Change ✅

```

Likewise:

```python
Row 3 Master = Checked
    -> Row 3 Childs Enabled ✅
    -> Other Rows No Change ✅

```

Help me on this case

I would appreciate any examples or best practices for handling row-specific interactions within nested Flex Repeaters.

Thanks!

---

<div class="post-metadata">

**Author:** ![arifrahuman.a1](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@arifrahuman.a1](https://forum.inductiveautomation.com/u/arifrahuman.a1)\
**Post date:** [September 3, 2026, 9:54am UTC](https://forum.inductiveautomation.com/t/nested-flex-repeater-enable-child-checkboxes-only-within-the-selected-row/116978/2 "2026-09-03T09:54:59Z")

</div>

Any One Help me for this case !!!!

---

<div class="post-metadata">

**Author:** ![RodrigoR](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RodrigoR](https://forum.inductiveautomation.com/u/RodrigoR)\
**Post date:** [September 3, 2026, 10:06am UTC](https://forum.inductiveautomation.com/t/nested-flex-repeater-enable-child-checkboxes-only-within-the-selected-row/116978/3 "2026-09-03T10:06:01Z")

</div>

Asign an index to every master checkbox, and have that index in the child checkbox. Then, the `system.perspective.sendMessage()`sends the index in the payload, and you only update the rows with the correct index.  
Your current code sends the message to every child.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [September 3, 2026, 10:09am UTC](https://forum.inductiveautomation.com/t/nested-flex-repeater-enable-child-checkboxes-only-within-the-selected-row/116978/4 "2026-09-03T10:09:29Z")

</div>

The problem has two causes:

1. `sendMessage(scope="page")` reaches **every repeated row**.
2. Setting `enable = True` only enables children; it does **not select them**.

Give every row a unique `rowId`, include it in the message, and ignore messages belonging to other rows.

Master checkbox script:

```python

```

```python
system.perspective.sendMessage(
    "updateChildCheckboxes",
    {
        "rowId": self.view.params.rowId,
        "checked": bool(currentValue.value)
    },
    scope="page"
)

```

Message handler inside the **Row Template** :

```python

```

```python
# Ignore messages for other rows
if payload.get("rowId") != self.view.params.rowId:
    return

checked = bool(payload.get("checked", False))
repeater = self.getChild("CheckboxRepeater")

new_instances = []

for instance in repeater.props.instances:
    item = dict(instance)

    if int(item.get("type", 0)) == 2:
        item["enable"] = checked
        item["value"] = checked # Select/unselect the child

    new_instances.append(item)

# Assign a new list so Perspective detects the change
repeater.props.instances = new_instances

```

Each Level 3 instance must contain a different ID:

```python

```

```python
[
    {"rowId": 1},
    {"rowId": 2},
    {"rowId": 3}
]

```

This makes the master checkbox affect and select only the children in its own row.
