# Creating a relation between a text value and an item in an array column doesn't work

**URL:** https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012
**Category:** Ask for Help
**Created:** [March 10, 2023, 11:12pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012 "2023-03-10T23:12:26Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Tim\_Gestels](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_gestels/32/44044_2.png) [@Tim\_Gestels](https://community.glideapps.com/u/Tim_Gestels)
#### Post date: [March 10, 2023, 11:12pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/1 "2023-03-10T23:12:26Z")

</div>

Hello,

I want to match the description of my car with a row in another table that contains the same value in an array.

But I don’t seem to be able to do this.  
Here’s a brief video:

Many thanks for your support!

best,

Tim

---

<div class="post-metadata">

### Author: ![BLA\_68](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@BLA\_68](https://community.glideapps.com/u/BLA_68)
#### Post date: [March 11, 2023, 2:03am UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/2 "2023-03-11T02:03:02Z")

</div>

One thing I noticed in your video: You identified a value in the Vehicle Compatibility Table that you expect to match the relation. But I noticed that that value is in New Column A in the Compatibility table. But in your relation, you are attempting to relate it to New Column B in that Compatibility Table.

---

<div class="post-metadata">

### Author: ![Tim\_Gestels](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_gestels/32/44044_2.png) [@Tim\_Gestels](https://community.glideapps.com/u/Tim_Gestels)
#### Post date: [March 11, 2023, 12:24pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/3 "2023-03-11T12:24:03Z")

</div>

Hi Bla\_68,

New Column A & B contain the same values, they are just different types.  
One is a split text and the other a make array.

I tried with different types of columns but this doesn’t seem to work.

---

<div class="post-metadata">

### Author: ![Tim\_Gestels](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_gestels/32/44044_2.png) [@Tim\_Gestels](https://community.glideapps.com/u/Tim_Gestels)
#### Post date: [March 11, 2023, 12:42pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/4 "2023-03-11T12:42:13Z")

</div>

In order to make it more clear. I created a template project for this issue.

> **[Test Array Relation](https://go.glideapps.com/template/chYaLGui3qfKfyH3jaE3-template-published?privateTemplateToken=MDTAQYdvHJ7KRpQtbshT)**

I just want to find a way to create a relation between the vehicle and the vehicle compatibility table.  
This doesn’t seem to work.

Also if someone would have a better suggestion for the excel formula used to create the array that would be welcome as well 🙂

Here’s a brief video again: [Loom | Free Screen & Video Recording Software | Loom](https://www.loom.com/share/c400ae5ceb244fbc915ac49bb8b18106)

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [March 11, 2023, 3:36pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/5 "2023-03-11T15:36:07Z")

</div>

Hi @Tim_Gestels

It works for me …

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/9/79847094805603e4cce9fdbb5cf72c3920e8862a.png)

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/6/86389de78efa580d06a5138bce316ec3a5186682.png)

If I create a relation between both tables using Car Brand and Car Brand[] as the key columns, I get this:

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/c/5c592efe45d71255e3f741f9aab6c9bf198255ce.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/3/83b1a50f84f8e27d123a86aca8827140e3cc815e.jpeg)

Maybe, the problem comes from you Excel column where you generate the Car List. Unfortunately, I can’t copy your template to reproduce and use your work (a Glide bug?).

Saludos!

---

<div class="post-metadata">

### Author: ![Tim\_Gestels](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_gestels/32/44044_2.png) [@Tim\_Gestels](https://community.glideapps.com/u/Tim_Gestels)
#### Post date: [March 11, 2023, 4:38pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/6 "2023-03-11T16:38:15Z")

</div>

thanks Gustavo, I’ll try to recreate what you built first and then go from there …  
Perhaps indeed it’s the Excel but I started wondering if it would be possible at all 🙂

Copying templates to someone elses environment indeed doesn’t work. But they’re looking into that.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [March 11, 2023, 5:23pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/7 "2023-03-11T17:23:30Z")

</div>

Maybe just check for any extra spaces that might be hiding somewhere. It won’t be obvious, but would be enough to break a relation.

---

<div class="post-metadata">

### Author: ![Tim\_Gestels](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_gestels/32/44044_2.png) [@Tim\_Gestels](https://community.glideapps.com/u/Tim_Gestels)
#### Post date: [March 11, 2023, 8:20pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/8 "2023-03-11T20:20:46Z")

</div>

@Jeff_Hager I think I found one but it’s really weird. It seems Glide is creating spaces when a cell is kept empty … ?

You can check this out in the following 2min video

Thanks for your support!

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [March 11, 2023, 9:01pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/9 "2023-03-11T21:01:55Z")

</div>

Tim,

Can you show/write here your Excel formula to test?

Are you sure that car brand values (Card brand column) don’t have extra spaces somewhere?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [March 11, 2023, 9:02pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/10 "2023-03-11T21:02:48Z")

</div>

I would just use a Template column instead of using an excel formula column. It’s a lot simpler and probably won’t give you the issues that you are running into.

---

<div class="post-metadata">

### Author: ![Tim\_Gestels](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_gestels/32/44044_2.png) [@Tim\_Gestels](https://community.glideapps.com/u/Tim_Gestels)
#### Post date: [March 13, 2023, 8:51pm UTC](https://community.glideapps.com/t/creating-a-relation-between-a-text-value-and-an-item-in-an-array-column-doesnt-work/59012/11 "2023-03-13T20:51:40Z")

</div>

Yeah but it needed to create a special .csv sequence. I don’t think the Template column would allow me to do that.

But I got a solution from @Dilon_Perera using the Javascript column.  
Kudos Dilon!

```auto
const startYear = p1;
const endYear = p2 ? p2 : new Date().getFullYear(); // if p2 is empty, set it to the current year
const text = p3;
const texts = Array.from({length: endYear - startYear + 1}, (_, i) => `${text} ${startYear + i}`).join(", ");
return texts;

```

I probably won’t use the Excel column anymore 🙂

Thanks everyone
