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.
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…
Hi Dominik,
I found the solution but it was completely different!
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).
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).
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!