Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Formula Beautification & Debugging Tools

cancel
Showing results for 
Search instead for 
Did you mean: 
Zollie
10 - Mercury
10 - Mercury

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.

15 Comments
Bill_French
17 - Neptune
17 - Neptune

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

itoldusoandso
10 - Mercury
10 - Mercury

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

Marko_Petrovic
7 - App Architect
7 - App Architect

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.

Bill_French
17 - Neptune
17 - Neptune

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.

Tim_Mackey
6 - Interface Innovator
6 - Interface Innovator

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.

itoldusoandso
10 - Mercury
10 - Mercury

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.

Samir_Ghosh
6 - Interface Innovator
6 - Interface Innovator

Formulas don’t have to get very long to be very prone to human error ((((((e.g., how much collective time is lost finding/fixing missing parens?))))))))))).

itoldusoandso
10 - Mercury
10 - Mercury

I am using CotEditor on MacOS and aside of the syntax highlighting, the best thing is it highlights the bracket pairs when you touch one of the brackets. It works in sort of similar ways as MS Excel but the brackets glow so easier to see than in Excel. Also can set dark mode, so the brackets glow is visible.

Another thing that would be so simple to fix and hugely beneficial is to show Child relationship in the Customize Filed Type box. Put somewhere another tab besides Formula / Formatting / CHILD … And clicking on these tabs will give me a listing of all the fields where this is the Parent field, that is where this field is being used for Calculation. There is the @kuovonne app Field List which was of great help to me and the app is great on its own. However, Airtable just should display the Child info in that box. That would be such an easy fix and save time to fish out all those child dependencies when I am trying to find out whether I can delete the field or not.

Show Parent and Child dependency

kuovonne
18 - Pluto
18 - Pluto

Thanks for the mention of my Field List app.

Are you suggesting that formula fields should have a list of fields that the formula itself relies on? If so, this information is available in the formula itself.

Or are you suggesting that all fields should have a list of fields that are calculated using the given field? Yes, this would be very helpful, but it is hard to say how easy a fix it would be. It would need to be present in all fields (not just formula fields), and base designers would have to be aware that fields may be used elsewhere such as apps, automations, scripts, and 3rd party integrations.

Justin_Barrett
18 - Pluto
18 - Pluto

Tracking field relationships is already part of the Base Schema app, so at some level the code already exists. I’m not saying it would be an easy port to display that in a new tab in the field settings, but it’s definitely much easier than starting from scratch.