Hi there,
I'm creating an editable table interface to allow users to edit attributes of a product (things like name, size, weight, material, price, category, subcategory) which will feed into our broader systems.
For the category and subcategory fields, I want users to be able to select from a pre-defined drop-down list. I've managed to get this working somewhat by reading from an existing SQL definition table and using the "Tag (Dropdown)" column type. This works really well for the 'category' field
For the subcategory field, though I need to have the available options filter based on the product's category - whether that's the user has just defined the category, or the category might have been already defined.
For example, if we have categories of 'furniture' and 'tech', and the user selects 'category = furniture', we should only be able to choose 'tables' or 'sofas' for the subcategory, and the options for 'laptops' and 'tvs' should be hidden for that row.
Does anyone know how I can do this in Retool, please?
In the background, I'm selecting data from a SQL source (which is where the dropdown options are coming from), but I don't know how to filter the options based on what's already displaying in the row (I think it would need to look at table.recordUpdates
first and then look at table.data
if the row hasn't been updated yet, but when I tried writing some JS to brute force this but retool just crashed and now I can't open that app again ).
Thanks very much!