Referencing the "Label field" from a Selection widget

So I need to reference the Label field to use that value to filter some options on a later Selection. WeWeb so far as I can find only lets you reference the Value field though (see screenshot 2). I feel like this should be a super obvious solve, but I can not find an easy solution, even the AI doesn’t help, it just ignores my question and references the Value field each time.

The Selection is getting the values from a Supabase table, so I’m wondering if there is a way to reference several of the values within that table. I feel like this should be super easy to do, but can’t work out how, or a solution within WeWeb.

I do have a workaround in that I can rebuild the supabase database for this one use case to function differently… but I’d really rather not change the structure of the backend for just one option out of hundreds I’m dealing with. Will make troubleshooting a nightmare down the track.

Any thoughts would be appreciated.


Screenshot 2025-07-01 083148

in your filter use the value field row_index to lookup the label field. Typically in this case you would have the label and the value set as the same thing. or just have an array of the labels in your select but im assuming your using the row_index for something else

I’m not sure how I’d use the value field to lookup the label field, tbh. I’ve been trying to achieve something like that using Workflows and pass the result to a variable for the last two hours to no avail. The AI has been absolutely no help at all either.

I need to use row_index for a price lookup later, it dramatically speeds the price lookup via the Supabase Edge Function. If I use the item_size as the value then in the price lookup I need to reference a table using two parameters to find the row_index to then fetch the price in the master price sheet (I’m working with stupidly un-standardised price sheets with a total of over 2 billion possible price combinations to try make a tool for work to quickly find item pricing without needing to leave a customer standing for 10-15 minutes while we go and manually calculate the price from spreadsheets).

in your item name filter say lookup(value, array in your select, row_index) if row index isn’t the id of that array in your select change it to be that arrays id and lookup the details from that id whenever you need something from there.

2 Likes

Thanks! After some dicking around, I got the filter working using lookup. Stuffed me up for a bit because the row_index is a number, but the Selection value converts it to a string, so it wasn’t matching. Enter toNumber and it all came together.

image

1 Like