# Lookup Multiple Values from One Cell / Many-to-Many Relation

**URL:** <https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456>\
**Category:** Ask for Help\
**Created:** [September 23, 2023, 12:13pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456 "2023-09-23T12:13:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raphael\_Aebersold](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/raphael_aebersold/32/64167_2.png) [@Raphael\_Aebersold](https://community.glideapps.com/u/Raphael_Aebersold)\
**Post date:** [September 23, 2023, 12:13pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/1 "2023-09-23T12:13:44Z")

</div>

Hi all,

I’m somehow confused with the “Relation” between two tables.

This is the situation:

- I have multiple “Split” values in relevant cells of the “agency” table. (“SEO”, “SEA”, “Google Ads”)
- I have another table “services” that matches single values like “SEO” to it’s respective HTML value (e.g., `<span style="stylisch html code">SEO</span>`)

What I wanted to achieve:

- I tried to create a “Match Multiple” Relation from the agency table to the services table in order to get the styled elements via a lookup column to my agency table.
- The result looks like this (image 1). As you can see, the relation is incorrect.

What I’ve tried so far:

- I’ve played around with different columns (lookup, query, relation, split, array) - nothing seems to fix the data retreival from the services table.

I guess I’ve got something wrong with the relation logic, but I can’t figure out what…Do you guys have any idea how i can convert the .csv data to multiple styled elements in an automated way without a for-loop?

Best,  
Raphael

 ![1-agencies](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/c/ccd8412fa3f7439b917cb6ad204afaa524ef3045.jpeg)

 ![2-lookup-values](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/3/7357b8d8ae40a42ee646f7e0fa5968f190562f19.jpeg)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 23, 2023, 12:23pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/2 "2023-09-23T12:23:17Z")

</div>

Start with a multiple relation in the first table that matches the split text column with the service name in the second table, then use a Joined List column to fetch the related HTML snippets (through the relation).

You will probably want to remove the default comma separator from the joined list column.

---

<div class="post-metadata">

**Author:** ![Raphael\_Aebersold](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/raphael_aebersold/32/64167_2.png) [@Raphael\_Aebersold](https://community.glideapps.com/u/Raphael_Aebersold)\
**Post date:** [September 23, 2023, 12:28pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/3 "2023-09-23T12:28:46Z")

</div>

Hi Darren,

Thanks for replying.

Did I get that correctly:

1. Relation column in the agency table, match split text to services in the services table. Activate match mutliple
2. Use a lookup column and then create a joined list with all the code values

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 23, 2023, 12:31pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/4 "2023-09-23T12:31:11Z")

</div>

No, you don’t need a lookup column. Just a relation and a joined list.

But, is this a continuation from yesterday? If it is, you could just use the JavaScript that Jeff provided and point it at the original list.

---

<div class="post-metadata">

**Author:** ![Raphael\_Aebersold](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/raphael_aebersold/32/64167_2.png) [@Raphael\_Aebersold](https://community.glideapps.com/u/Raphael_Aebersold)\
**Post date:** [September 23, 2023, 12:36pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/5 "2023-09-23T12:36:08Z")

</div>

Hi [Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy),

You helped me find the solution! But not the way I expected, cause what you just mentioned was exactly the way I’ve tried it.

However, the thing is, that if I refer to split value columns subsequently, the glide app does something weird (or at least I don’t get it).

It only ever uses the split values correctly if I copy a whole column and paste it at the same place again. On the bottom I can always see an “updateing” indicator. (This worked, however!) 🙂

So I guess glide just doesn’t refresh data when a new column is added?

It’s exactly the same issue with filters:

> [@Identical filters after added row although "Split Value" Column is used for filtering](https://community.glideapps.com/t/identical-filters-after-added-row-although-split-value-column-is-used-for-filtering/66438/3):
>
> Hi [ThinhDinh](https://community.glideapps.com/u/ThinhDinh), Sure, I struggled explaining it properly, sorry. Image 1: I have a table with a filter. The filter is called “Ziele”. Image 2: I pull the items for the filter from a split text column. The text to be split is taken by the column right next to it – a column with comma separated values. To put it in context: all this information so far is in the main table i’m using for the app. In order to collect user data, however, I have a different table (“new entries”) so i can check entrie…

Anyhow, thanks for your help and if you know if there is a way to automatically update a table after a column has changed / calculated something then please lemme know.

---

<div class="post-metadata">

**Author:** ![Raphael\_Aebersold](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/raphael_aebersold/32/64167_2.png) [@Raphael\_Aebersold](https://community.glideapps.com/u/Raphael_Aebersold)\
**Post date:** [September 23, 2023, 12:38pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/6 "2023-09-23T12:38:17Z")

</div>

Yes, exactly. The pills worked perfect. But what do you mean by “point to the javascript” is there a way to use JS?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 23, 2023, 12:44pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/7 "2023-09-23T12:44:07Z")

</div>

Here…

---

<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:** [September 23, 2023, 12:54pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/8 "2023-09-23T12:54:03Z")

</div>

Might be related.

> [@Raphael\_Aebersold](#):
>
> It only ever uses the split values correctly if I copy a whole column and paste it at the same place again

> [@Identical filters after added row although "Split Value" Column is used for filtering](https://community.glideapps.com/t/identical-filters-after-added-row-although-split-value-column-is-used-for-filtering/66438/4):
>
> Ah, I know what’s going on. It’s because you are manually copying and pasting. There is currently an ongoing issue when you copy and paste text. Seems that the underlying Unicode for maybe the space character is different from what it would be when you type a space compared to when you copy/paste. The text looks identical, but it isn’t. Your best option is to manually type the text instead of using copy and paste until Glide fixes that issue. Or you can pull that data using relations and L…

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 23, 2023, 1:00pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/9 "2023-09-23T13:00:08Z")

</div>

@Raphael_Aebersold - something else I just noticed. See below:

 ![CleanShot 2023-09-23 at 20.56.40@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/2/82f714e2f161a7ef3edb7c1478f2e9389cb520af.png)

You called that column “template”, but it’s a basic text column, which suggests to me that you added the values for all rows by copy/pasting, yes?

That’s way, way more work than you need to be doing. What you should be doing there is using an _actual_ template column. Then you configure it once, and it’s automagically applied to all rows - even new rows that get added.

> **[Template Column](https://www.glideapps.com/docs/automation/computed-columns/template-column)**
>
> Display dynamic text that can change with the values in other columns.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [September 30, 2023, 1:00pm UTC](https://community.glideapps.com/t/lookup-multiple-values-from-one-cell-many-to-many-relation/66456/10 "2023-09-30T13:00:29Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
