Formula Beautification & Debugging Tools

Here are a couple ideas, but this is a topic I’m sure Airtable developers could have fun with:

  • Multi-line formula editor (then auto-minifying before submission)
  • Error code highlighting

But if that’s too ambitious, a simple code beautifier would be sufficient. This one unfortunately doesn’t play nice with Airtable formulas because of the braces { } in fields names.

5 Likes

Also known as the Script Blocks editor. They have it; they just need to align all code development features to this editor.

2 Likes

Fund a way to expand the box in the meantime … Anybody else got issue with ’ and ' characters?
Just type in a very long string like ______ then edit formula and once you are done then delete. It expands it a bit horizontally.

Woučd be nice, for a start, that we can at least expand the editor (for example similar to long text field), so when we write some short simple formula we can use normal window, but when we need to write longer and more complex formulas we can expand it to ger more space. Current formula window is really small and not user frendly for except simplest of formulas.

Also error highlighting and other advances features would be great, but I think this bigger “canvas” is aspolute must, because at the moment writing longer formulas is reall pain.

Just an observation, but if you need really long formulas, it’s telling you something about the platform that is not ideal.

In any development environment, abstraction and business logic are essential. In addition to expanding the ability to edit complex logic, Airtable must make it possible to create and manage business logic as reusable components as:

  • Aggregations of native formulas (into a helper formula);
  • New formulas defined in javascript (i.e. script blocks);
  • Queries defined in GraphQL.

And overall, the ability to access these logical components to perform automated changes, backups, and documentation.

2 Likes

Agree with this request 1000%. I currently write all of my Airtable formulas in VS Code so that I can format with multiple lines and have code highlighting. Thankfully Airtable at least preserves my formatting, but having a better formula editor is really a must-have.

Also, I’ll echo what Bill said about long formulas. There’s definitely improvements that could be made here.

I like to bump up this one, sorry to be annoying, I just hope anybody from Airtable staff is reading this enough.

Add error highlighting to formula boxes: Not just saying… “Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.”

So many things are on my wishlist in terms of the formula box but this one is the #1 and it would be amazing to see something implemented soon, it’s so simple:

Add some basic error highligting and (if possible) precisely underline where the error in the formula is. Often, the error in the formula as simple syntax missing like bracket, or instead of “” there is "’ etc.

Having the formula box showing where the error in the formula is would greatly reduce the amount of time fixing the formulas.

Update: I use “CotEditor” app on MacOS so I can fix those missing brackets easier (suggestions from @Bill.French and @Justin_Barrett ), but still other characters like missing " & " causes frequent issues. It it was a complex formula, I wouldn’t expect Airtable formula editor to teach me how to write my formula but simply highlighting missing " & " in my 20 lines long concatenated formula would reduce the amount of time it takes to fix the formulas.

2 Likes