# How to display items in a Select field depending on another Select field?

**URL:** <https://community.weweb.io/t/how-to-display-items-in-a-select-field-depending-on-another-select-field/5545>\
**Category:** How do I?\
**Created:** [November 24, 2023, 12:02pm UTC](https://community.weweb.io/t/how-to-display-items-in-a-select-field-depending-on-another-select-field/5545 "2023-11-24T12:02:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BertrandG](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/bertrandg/32/5129_2.png) [@BertrandG](https://community.weweb.io/u/BertrandG)\
**Post date:** [November 24, 2023, 12:02pm UTC](https://community.weweb.io/t/how-to-display-items-in-a-select-field-depending-on-another-select-field/5545/1 "2023-11-24T12:02:07Z")

</div>

Hello,  
I got a Select element in a form where I can choose a customer. In the list, only the customer name is displayed. I got a second Select element where I want to select a contact for this customer. But I have no idea how to “filter” the customer\_contacts list using the c\_id which is present in both tables (Supabase). I.e. if contacts.c\_id = c\_id of the selected customer, then display a list of those contacts.

Note: I cannot use a view for contacts+customers since I want to change values.

Additional issue: I have separate columns for first and last name. But I can only display either the first or the last name in the Select list. How can I concatenate the two before displaying them in the Select list? I already tried adding a virtual (saved) colum in Supabase but this doesn’t work.

---

<div class="post-metadata">

**Author:** ![Dominic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dominic/32/5645_2.png) [@Dominic](https://community.weweb.io/u/Dominic)\
**Post date:** [November 24, 2023, 1:42pm UTC](https://community.weweb.io/t/how-to-display-items-in-a-select-field-depending-on-another-select-field/5545/2 "2023-11-24T13:42:39Z")

</div>

Create a workflow and fetch Contacts and filter by id of the selected Customer on change of the Customers select. In case of Supabase filtering by plugin is made on backebd so you will get only Contacts bound to this customer. Bind Customers selection to the other Select using variable f.e. selected\_company which value changes when you change the selection. Just the general idea…

---

<div class="post-metadata">

**Author:** ![BertrandG](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/bertrandg/32/5129_2.png) [@BertrandG](https://community.weweb.io/u/BertrandG)\
**Post date:** [November 24, 2023, 5:03pm UTC](https://community.weweb.io/t/how-to-display-items-in-a-select-field-depending-on-another-select-field/5545/3 "2023-11-24T17:03:26Z")

</div>

Hi Dominik,  
I found the solution but it was completely different!

1. I changed the Select customer Value field to c\_id (I didn’t do this before; this is why I could never use the id for filtering; the Label field was already the customer name).
2. I used a filter for the contacts.data. This didn’t work first but although the id is numeric one has to use ToNumber(customer id).

It works perfectly now, w/o any variable or workflow. Hopefully my experience also helps others!

And you also answered one of my biggest concerns: There had been conflicting statements (Office Hours and videos) regarding the filter feature. Some said, filtering is on the **frontend** , others on the **backend** (I’m talking of **Supabase** , not Xano).

---

<div class="post-metadata">

**Author:** ![BertrandG](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/bertrandg/32/5129_2.png) [@BertrandG](https://community.weweb.io/u/BertrandG)\
**Post date:** [November 24, 2023, 5:09pm UTC](https://community.weweb.io/t/how-to-display-items-in-a-select-field-depending-on-another-select-field/5545/4 "2023-11-24T17:09:01Z")

</div>

Oh, one issue remains: How can I **display both first and lastname** in the Select list? I can only select 1 column in the Label field.  
I’ve now added this as a new topic!
