# 🐛 Issue with Table Data Not Rendering Inside Loop (Alpha Studio)

**URL:** https://community.neutrinos.com/t/issue-with-table-data-not-rendering-inside-loop-alpha-studio/932
**Category:** Community
**Tags:** neutrinos-alpha
**Created:** [July 11, 2025, 2:00pm UTC](https://community.neutrinos.com/t/issue-with-table-data-not-rendering-inside-loop-alpha-studio/932 "2025-07-11T14:00:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dhishon](https://community.neutrinos.com/user_avatar/community.neutrinos.com/dhishon/32/293_2.png) [@dhishon](https://community.neutrinos.com/u/dhishon)
#### Post date: [July 11, 2025, 2:00pm UTC](https://community.neutrinos.com/t/issue-with-table-data-not-rendering-inside-loop-alpha-studio/932/1 "2025-07-11T14:00:22Z")

</div>

Hi everyone,

I am currently facing an issue in **Alpha Studio** related to rendering `table` type data **inside a loop**.

### 🧩 Description:

When iterating through a JSON structure to render fields dynamically, everything works fine for most field types like `"input"` and `"date"`. Even for `"table"` types, the **table UI renders properly** , but the **data inside the table is not being displayed** but i had mapped correctly.

It seems that when the component hits a `type: "table"` inside the loop, it recognizes it correctly and displays the table layout — but it **doesn’t render the rows from the `value` array**.

### 🧪 Example JSON Snippet:

```auto
{
  "key": "diagnosis",
  "value": [
    {
      "primary": false,
      "diagnosis": "Ischialgia",
      "icd_code": ["M54.3"],
      "description": "Pain radiating along the sciatic nerve..."
    },
    {
      "primary": true,
      "diagnosis": "Vertigo",
      "icd_code": ["R42"],
      "description": "A sensation of spinning dizziness..."
    }
  ],
  "type": "table",
  "error": ""
}

```

### ✅ What’s working:

- Table type is detected correctly .
- The **table component appears**.

### ❌ What’s not working:

- The **data rows inside the `value` array are not rendering**.
- No error shown; it just silently fails to display the content.

### 🧠 Suspected Cause:

It might be a rendering issue where the loop isn’t correctly accessing or mapping over the nested `value` array when `type` is `"table"`.

* * *

### 🙏 Request:

Has anyone faced this before or found a fix or workaround? Any insight into how the table rows can be correctly rendered inside a loop would be appreciated.

Thanks!

@Eldho

---

<div class="post-metadata">

### Author: ![Eldho](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/e/c6cbf5/32.png) [@Eldho](https://community.neutrinos.com/u/Eldho)
#### Post date: [July 11, 2025, 2:26pm UTC](https://community.neutrinos.com/t/issue-with-table-data-not-rendering-inside-loop-alpha-studio/932/2 "2025-07-11T14:26:18Z")

</div>

@Shamnad_KS @Sam @Simphiwe @Irfan_Ali

---

<div class="post-metadata">

### Author: ![Ziyad](https://community.neutrinos.com/user_avatar/community.neutrinos.com/ziyad/32/343_2.png) [@Ziyad](https://community.neutrinos.com/u/Ziyad)
#### Post date: [July 11, 2025, 7:42pm UTC](https://community.neutrinos.com/t/issue-with-table-data-not-rendering-inside-loop-alpha-studio/932/3 "2025-07-11T19:42:39Z")

</div>

Hey! I faced a similar issue before, and this workaround helped me

```auto
let index_j = params.context?.j; // Get the inner loop index
let index_i = params.context?.i; // Get the outer loop index

let tableId = `table_id-i${index_i}-j${index_j}`; // Construct the dynamic table ID
let table = ap.$(tableId); // Access the table component

let table_value = [{ value: "value" }]; // Example of data you want to set in the table

setTimeout(() => {
    table.value = table_value ; // Replace with your actual data source
}, 100);

```

Put this code in table onLoad and check if this workaround works for your case too!

---

<div class="post-metadata">

### Author: ![dhishon](https://community.neutrinos.com/user_avatar/community.neutrinos.com/dhishon/32/293_2.png) [@dhishon](https://community.neutrinos.com/u/dhishon)
#### Post date: [July 13, 2025, 11:08am UTC](https://community.neutrinos.com/t/issue-with-table-data-not-rendering-inside-loop-alpha-studio/932/4 "2025-07-13T11:08:10Z")

</div>

Thanks !!! That worked perfectly the table rows are now rendering correctly inside the loop. Appreciate the help! 🙌  
@Ziyad
