promptGPT() Sadly Doesn't Exist

832 2
Showing results for 
Search instead for 
Did you mean: 

There's a lively conversation about querying data that is not ideally shaped to answer the desired question over on Table Forums. It is related to an earlier time shortly after scripts were made possible in Airtable when I recommended (in 2020) that a script should be afforded the ability to become a custom formula. I'm not the only developer who has thought about this.

@kuovonne provides an approach to answering the question that started the conversation. But I have and still would love custom formulas to do this.

Imagine a different approach that requires only your data and one API call to OpenAI that costs about 1/60th of a penny.

Given this GPT query:


This is a straightforward idea, but when performing queries across data tables that may not be ideally shaped, we will increasingly see LLMs provide answers where scripting or formulaic approaches are complex and require skills and added development time (of course).

gptPrompt("Given this list of dates, determine which is the latest:", [{field1}, {field2}, {fieldn...}])

Sadly, this formula is not possible, but it could be if custom scripts could be the underlying logic of custom formulas. In my view, this is one of the most significant missed opportunities for Airtable in this decade.

2 Replies 2

Nice to see you, Bill!

While I like the idea of a formula field that is computed by a custom script, I think there are lots of thorny issues in trying to implement this idea. 

I think two issues are
- Airtable attracts a lot of novice script writers
- formula fields update with each key press

Novice script writers often have a hard time writing efficient scripts and dealing with edge cases. When a formula needs to recalculate on hundreds of thousands of records, you need efficient code. When you have long chains of back-and-forth rollups, you need efficient code. When key presses can result in inputs that the script writer didn't anticipate, you want the code to handle that gracefully.

Airtable has a history of not implementing features for which there are workarounds. Currently the workaround is an editable field (with edit permissions restricted automations) + automation + script.


On a different note, which is the latest date from this list:

Is it 11/8/2023 or 9/9/2023?

It is so difficult to respond to anything on this platform, so if it seems like I'm not engaging, it's because I'm not engaging.

> Airtable attracts a lot of novice script writers
> formula fields update with each key press

Irrelevant. Here's why.