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

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

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.

1 Like

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.

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

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 :slight_smile:

Here’s a brief video again: Loom | Free Screen & Video Recording Software | Loom

Hi @Tim_Gestels

It works for me …

image

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

image

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!

1 Like

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 :slight_smile:

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

1 Like

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.

3 Likes

@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!

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?

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.

2 Likes

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!

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 :slight_smile:

Thanks everyone

2 Likes