# foreignID from HubDB return an empty array

**URL:** <https://community.hubspot.com/t/foreignid-from-hubdb-return-an-empty-array/110752>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [July 5, 2024, 1:48pm UTC](https://community.hubspot.com/t/foreignid-from-hubdb-return-an-empty-array/110752 "2024-07-05T13:48:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlessandAlessio](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@AlessandAlessio](https://community.hubspot.com/u/AlessandAlessio)\
**Post date:** [July 5, 2024, 1:48pm UTC](https://community.hubspot.com/t/foreignid-from-hubdb-return-an-empty-array/110752/1 "2024-07-05T13:48:43Z")

</div>

I’m working on a customization for mine template trying to integrate HubDB. I’m displaying a table into the frontend and all string’s field works. The only one field with foreignId column (dropdown) doesn’t work and the field return “[]” as seem as an empty array.

I’m checking mine code but it seem right.  
Someone can help me?

```lia-code-sample
<div class="certificate-card">
 <h1>{{ dynamic_page_hubdb_row.nome }} {{ dynamic_page_hubdb_row.cognome }}</h1>
 <h2>data rilascio {{ data_di_rilascio }}</h2>
 <h2>data scadenza {{ data_di_scadenza }}</h2>
 <h2>canali 
 {% for foreign_row in canali_di_distribuzione %}
 * {{ foreign_row }}
 the name for foreign row {{ foreign_row.hs_id }} is {{ foreign_row.name }}
 {% endfor %}
 </h2>
 </div>

```

The field is named “canali\_di\_distribuzione” and i’m trying to loop this field but seem it’s empty.

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [July 8, 2024, 11:11pm UTC](https://community.hubspot.com/t/foreignid-from-hubdb-return-an-empty-array/110752/2 "2024-07-08T23:11:50Z")

</div>

Hey @AlessandAlessio

It seems like the reference to the current row is missing when trying to get the value in the foreign table.

Have you tried this?

```lia-code-sample
<div class="certificate-card">
 <h1>{{ dynamic_page_hubdb_row.nome }} {{ dynamic_page_hubdb_row.cognome }}</h1>
 <h2>data rilascio {{ data_di_rilascio }}</h2>
 <h2>data scadenza {{ data_di_scadenza }}</h2>
 <h2>canali 
 {% for foreign_row in dynamic_page_hubdb_row.canali_di_distribuzione %}
 * {{ foreign_row }}
 the name for foreign row {{ foreign_row.hs_id }} is {{ foreign_row.name }}
 {% endfor %}
 </h2>
 </div>

```

Essentially, add “dynamic\_page\_hubdb\_row” before “canali\_di\_distribuzione” to make it be “ **dynamic\_page\_hubdb\_row.canali\_di\_distribuzione** ”.
