This seems like a critical omission. Yet nobody else seems to care? Thankfully there isn’t an arbitrarily small limit on the length of the equations, because I had to use some Taylor expansions in order to migrate some data over from Google Sheets. What should have been as simple as ACOS(L/R) had to be turned into this monster, just to get 0.01 precision…
I agree - it is very important that the common math functions pervasive across all spreadsheet products are included in Airtable.
I have one client who could not tolerate this and compelled me to make it possible to use the entire Javascript Math library with Airtable fields. And it supports custom functions which could be mixtures of the standard Javascript Math library.
I could only do it using the Airtable API and oddly, I used Google Apps Script to build it out. This is also accomplished without adding more formula fields (which they prefer) - the results are simply numeric fields that are updated whenever they are empty. They use a pseudo-script language in an Airtable text field that I invented which looks like this.
// set the base to Airdrop Demo
set base to appAvzbF1dJ9OkgMn
// set the table to the string parsing demo
set table to Math Functions Demo
// compute the values
replace all {{COS Results}} with {{Value (x)}}.Math.cos() where {{Name}} == COS(x)
replace all {{ACOS Results}} with {{Value (x)}}.Math.acos() where {{Name}} == ACOS(x)
replace all {{ATAN Results}} with {{Value (x)}}.Math.atan() where {{Name}} == ATAN(x)
There are so many places where I see people hitting these types of low ceilings. I guess I need to think about open-sourcing my solution. My fear is they will add this functionality the day I publish this approach. :neutral_face:
If we simply had an embedded javascript engine inside Airtable, this and many other desperately-needed computational features would be at our fingertips.
Additional summary functions (MEDIAN/MODE) on top of the existing AVERAGE would be quite helpful. Not sure why they’re included in the field summary areas, but not in functions?
Also Retool allows users to jam Javascript in just about anywhere - I find this approach to handling transformations much more compelling than Airtable’s formula DSL.
Yes please we need these functions, I wanted to recreate a trig function from Excel such as
=[@[OD]]-(((TAN( RADIANS(7)))*[@Length])*2)…
How can I do this in Airtable?
Ya know, with the Script Block you are able to put a dent in this issue. If you don’t know how to write javascript, just ask for some help with a specific function. Once you see how it’s done, you might be able to extend it to meet your goals.