# Lookup column not working for me

**URL:** <https://community.glideapps.com/t/lookup-column-not-working-for-me/67323>\
**Category:** Ask for Help\
**Created:** [October 26, 2023, 9:35pm UTC](https://community.glideapps.com/t/lookup-column-not-working-for-me/67323 "2023-10-26T21:35:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)\
**Post date:** [October 26, 2023, 9:35pm UTC](https://community.glideapps.com/t/lookup-column-not-working-for-me/67323/1 "2023-10-26T21:35:22Z")

</div>

When adding a new row, I ask for customerID, once the customer ID is given, I have a relation column mapping this customerID to a customer table. I use lookup to map across a few coloumns (company name, address, contact number, email, etc…)

However, I am using googlesheets and I need this information to appear in google sheets, so I have created text fields for each of these fields and in the components I put in the lookup columns as the default value (and I hide the component, so it is automatically populated).

However, it seems that instead of pulling the information of the current working table, it seems to pull in the information of the first row of the clients table.

---

<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:** [October 27, 2023, 1:21am UTC](https://community.glideapps.com/t/lookup-column-not-working-for-me/67323/2 "2023-10-27T01:21:01Z")

</div>

Something isn’t right - you’ll need to share more details of how your relation and lookups are configured.

---

<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:** [October 27, 2023, 1:22am UTC](https://community.glideapps.com/t/lookup-column-not-working-for-me/67323/3 "2023-10-27T01:22:42Z")

</div>

Sounds to me that the form is opening from a top-level view that sources the table, opposed to the details view of a specific record.

---

<div class="post-metadata">

**Author:** ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)\
**Post date:** [October 27, 2023, 3:15am UTC](https://community.glideapps.com/t/lookup-column-not-working-for-me/67323/4 "2023-10-27T03:15:26Z")

</div>

I think @ThinhDinh could be on the right path. I am using a Table Collection with the built in “Add” I am trying to create a new Invoice.

When creating the invoice I insert the customer ID.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/7/87be014ede5e2829a4c341b1ed4027318a928926.png)  
The custID has a relation to the customer table a column also called custID.  
Then I am doing lookup using that relation to pull up the ClientName, ClientAtten, etc…  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/6/967af331d4a42a8c3b218bad2649a8737c5f711a.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/9/09c0c53927aa5524f8c012bdd02890f51341ac98.png)

However I want these to be available in the google sheet so I create a text component with the default value set to the lkupClientAtten  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/6/76f99c806497ae904f7e59e1ac20b7eb0caaabb3.png)

When I go to the Add form, the clientAtten field is defaulted to the first entry in the table (“Joe Test”, regardless of the actual custID choice I make.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/f/ffb3c0c8bb4cac2b471bb3c6b3badff6ae792fe0.png)  
no client set yet

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/c/ec9c74ff683eae4d11da3b5b780bafbafab3c7a8.png)  
client is set

---

<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:** [October 27, 2023, 3:55am UTC](https://community.glideapps.com/t/lookup-column-not-working-for-me/67323/5 "2023-10-27T03:55:48Z")

</div>

> [@Dan\_San](#):
>
> When I go to the Add form, the clientAtten field is defaulted to the first entry in the table (“Joe Test”, regardless of the actual custID choice I make.

yeah, that’s because nothing is written to the table until you submit the form, so the choices you make inside the form have no impact.

I think to get this to work you’re probably going to have to use a Custom Form.

---

<div class="post-metadata">

**Author:** ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)\
**Post date:** [October 27, 2023, 1:26pm UTC](https://community.glideapps.com/t/lookup-column-not-working-for-me/67323/6 "2023-10-27T13:26:35Z")

</div>

Thanks Darren.

Understood. I think I am better off using a vlookup in the googlesheet.
