Help

Re: Dynamic Dropdown #indirect #substitute

2984 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Christine_Kight
5 - Automation Enthusiast
5 - Automation Enthusiast

I just imported an Excel Spreadsheet but one of my formulas did not come through – namely, =INDIRECT(SUBSTITUTE(fieldname," “,”_"))

The value of the previous field determines the single select options for the subsequent field. I notice another user posted this request last year, but for some reason the topic was closed a short time later.

Does anyone have a workaround?

:grinning_face_with_sweat: Some of these threads indicate that “This topic was solved and automatically closed” – so dynamic dropdowns must have been enabled :slightly_smiling_face: I just haven’t found out how to do it yet.

7 Replies 7
Christine_Kight
5 - Automation Enthusiast
5 - Automation Enthusiast

While this isn’t really satisfactory, here’s what I’m doing for now which at least enables me to move on to the next step, despite a jury-rigged style intermediary…

I have two single-select fields rather than one – with the first value in each dropdown indicating a type of categorically specific “null” – in essence, allowing me to refer to the alternate field containing the other dropdown. Not really elegant, but good enough for now.

PS - But AirTable Support Staff, please don’t count this as “solved” ! LOL :grinning_face_with_big_eyes:

This Functionality is not possible with Airtable. There are some work arounds but they are fragile. I would send Airtable support an email to let them know you want this type of cascading/dynamic filtering functionality.

As someone here already pointed out, dynamic dropdowns are actually a thing as of recently, I’ve been using them for a while to teach regex to colleagues by breaking up a long regex patterns across numerous fields. Some exotic scenarios even allow you to load code via field names and are the only aspect of the solution that I’d describe as “fragile”, presumably because they were never meant to be used in such fashion.

Would you mind pointing us to a demo or example of this feature? What was the recent change that facilitated this functionality?

The base is client’s property so can’t share it without explicit consent. This should be enough to get you going, though, just consider the following way of populating fields:

image

the end result looks the same like just writing [0-9] into a single-line field, (times however many records you might have), right?

But here’s the real reason we’re doing it this way: modular regex invocations:

image

I found this approach to result in significantly easier debugging tasks and maintenance (this is part of a natural language processing pipeline with a data-to-text component, meaning things real crazy, real fast, and I need to be able to make sense of hundreds of fields at a glance) than relying on 50-line formulas, regardless of whether you’re inputting them directly or importing from an IDE.

The field names aren’t the most revealing in this example, but this particular setup started as an attempt to write (and teach) regex without having to fiddle with the claustrophobic formula field but while still getting real-time results.

The nested logic also works with both short and long text fields, as well as choice-based fields and links (it just outputs their visible string values to plaintext). The interpolation is pretty limited, however, and trying to drill deep into the concept will probably result in you slamming headfirst into a wall of technical debt.

For heavy - or rather: heavier - interpolation with acceptable performance (assuming that is what you’re really after), look no further than the scripting block/app itself. All you really need to internalize to get started is that:

let test = '## hello, airtable' + " and $goodbye"
let aloha = `${test}`
output.markdown(aloha)

… would output an h2-level subheader like this:

hello, airtable and $goodbye

Grave accents/backticks `` and the ${} template literal form that utilizes them are the key to making it work in this context. Because everything between the curly brackets gets evaluated on the condition that the result is returned as a string. Scaffolding prototypes this way is much quicker than fiddling with a bajillion dynamic fields but good luck debugging extra whitespaces in the scripting block at 5am, or so I hear.

ScottWorld
18 - Pluto
18 - Pluto

Airtable doesn't offer this feature natively in its own forms, but dynamic dropdowns are a native feature of Fillout's advanced forms for Airtable, which is 100% free and offers highly advanced forms for Airtable.

Fillout offers TONS of other advanced functionality that people have been dreaming of for years in their Airtable forms, such as updating Airtable records with a form.

Also, this dynamic dropdown capability is also available in Noloco, which is an external interface builder and portal for Airtable.

OfficeOurs
7 - App Architect
7 - App Architect

Make a static (direct) reference to a dynamic field, instead of making a dynamic reference (indirect) to a static field.

The workaround for INDIRECT is dynamically pulling the value using the switch function, preferably using an intermediate field. The switch function could be dependant on the value of the dropdown.

See my example here.

I know its late, but I hope it'll help someone else.