# Using lookups or arrays as columns in a Data Grid component

**URL:** <https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979>\
**Category:** Ask for Help\
**Created:** [August 29, 2024, 6:51pm UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979 "2024-08-29T18:51:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Bronfeld](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason_bronfeld/32/64705_2.png) [@Jason\_Bronfeld](https://community.glideapps.com/u/Jason_Bronfeld)\
**Post date:** [August 29, 2024, 6:51pm UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/1 "2024-08-29T18:51:57Z")

</div>

I think I know the answer, but I thought I’d ask. I have a table with rows of data sorted by date. I was hoping I could look up rows by date and use them to populate a data grid component.

I suspect that the data grid component just points to a table and can’t be derived.

Do I have that right?

![table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f545288cf93c752274cafd3f813769234ce8c1b8.png)

I love to create an relation to this table and select by date, then display that in a data grid column.

As always, help appreciated.

---

<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:** [August 29, 2024, 7:32pm UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/2 "2024-08-29T19:32:34Z")

</div>

Why can’t you use a relation, query, or filter to do that?

---

<div class="post-metadata">

**Author:** ![Jason\_Bronfeld](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason_bronfeld/32/64705_2.png) [@Jason\_Bronfeld](https://community.glideapps.com/u/Jason_Bronfeld)\
**Post date:** [August 29, 2024, 7:56pm UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/3 "2024-08-29T19:56:11Z")

</div>

As always seems to be the case with me, now that come back to glide it’s working. Sigh…  
Is there a way to easily remove the display of the index column from the left?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 30, 2024, 12:50am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/4 "2024-08-30T00:50:52Z")

</div>

Nope, have you tried using the new table component instead?

---

<div class="post-metadata">

**Author:** ![Jason\_Bronfeld](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason_bronfeld/32/64705_2.png) [@Jason\_Bronfeld](https://community.glideapps.com/u/Jason_Bronfeld)\
**Post date:** [August 30, 2024, 2:22am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/5 "2024-08-30T02:22:50Z")

</div>

So, I can get the relations and lookups to create columns in the data grid component. I can’t figure out how to do the same in the table component. What is the difference?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 30, 2024, 2:24am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/6 "2024-08-30T02:24:43Z")

</div>

Can you tell me what you mean by “create columns”? It should be the same method between the two components (add a new column and point to the right value).

---

<div class="post-metadata">

**Author:** ![Jason\_Bronfeld](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason_bronfeld/32/64705_2.png) [@Jason\_Bronfeld](https://community.glideapps.com/u/Jason_Bronfeld)\
**Post date:** [August 30, 2024, 2:52am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/7 "2024-08-30T02:52:32Z")

</div>

I have a table of dates. Columns are date-as-key, start, best and end.

In a different table, I capture a date selected by the user. In this table I have a relation linking the selected date to rows in table of dates by the date key column.

I create 3 lookup columns, one for start, one for best, one for end thru the relation.

 ![Screenshot 2024-08-29 at 10.46.28 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/d/0d9b8c28303f5ee8e9f1284ea8f76c0d07ce6dd5.jpeg)

When I create a data grid and select a look-up, say start, for a column value, the data-grid column is filled with the data from the lookup.

 ![Screenshot 2024-08-29 at 10.50.40 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/9/f9e2cdf3a1d24700eefecd3d17a9a12b487e72ec.jpeg)

When I use a table and select the same look-up for a column, it populates the column with the entries from the start column, not from the specific start look up value.

 ![Screenshot 2024-08-29 at 10.50.29 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/1/01b9a7786f50082e079af60928dc4977505bb315.jpeg)

You can see from the images, I’m using the same columns/look-ups for values in both cases, but the results are different.

All help appreciated.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 30, 2024, 2:56am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/8 "2024-08-30T02:56:43Z")

</div>

But you’re having multiple values in the lookup right? If you want a single value, your relation should be single.

How are you creating the relation/lookup and what do you want to achieve here?

---

<div class="post-metadata">

**Author:** ![Jason\_Bronfeld](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason_bronfeld/32/64705_2.png) [@Jason\_Bronfeld](https://community.glideapps.com/u/Jason_Bronfeld)\
**Post date:** [August 30, 2024, 3:06am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/9 "2024-08-30T03:06:26Z")

</div>

It’s working perfectly for the Data Grid. I want the multiple values from the relation/lookup to populate the column of the grid or table. That’s exactly what I want.

I use the exact same sheet with the exact same lookup columns in a Table and I get the different answer.

With respect to how am I creating, not sure what you mean. I’m using the Glide interface, adding columns, selecting types and options in the pop-ups. Nothing fancy or custom.

What I’m confused about is that the same exact information source, used in the same way in the two components behaves differently.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 30, 2024, 3:36am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/10 "2024-08-30T03:36:18Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/f/1fdc6a1fa5e1532f0d8c9f89a6a30cbb69952f05.jpeg)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/a/eab2f6545d8f7882022e96eeb12f8b0bd9e3aa7d.jpeg)

You’re using two different sources.

---

<div class="post-metadata">

**Author:** ![Jason\_Bronfeld](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason_bronfeld/32/64705_2.png) [@Jason\_Bronfeld](https://community.glideapps.com/u/Jason_Bronfeld)\
**Post date:** [August 30, 2024, 3:48am UTC](https://community.glideapps.com/t/using-lookups-or-arrays-as-columns-in-a-data-grid-component/75979/11 "2024-08-30T03:48:34Z")

</div>

Interesting! I’ll double check it. That would explain it. Thank you.
