Formula Array Count without String Length

I don’t want to rollup and I don’t want to use string lengths to count array elements. Just give me a real count() function. Bonus points for allowing me to cast a string into an array.

You mean like this? It counts the number of array elements in a linked field.

Yes. They already have arrays for linked records but I don’t really want to create a table for every word possible just so I can count words… As an example.

Okay - so, I think you’ll need to provide a little guidance with a screen shot or a sample of actual data.

I want your example to work on an array which means I need the ability to create an array.

As I understand it the only thing your count example works on is linked fields. I want it to work on a sentence for example, or tags that are entered free form and not linked.

I can count characters but I am suggesting a feature for arrays.

LOL - there’s a long list of requests for Split(). Asked and never answered. More than 20 requests in the community spanning more than six years.

May I suggest a script as the only likely pathway?

1 Like

Well that doesn’t give me a warm fuzzy. Code is fine, thanks for trying.

I am re-evaluating Airtable after giving up once before almost solely because I read about the JSON editor block.

I’m curious, what was the issue that caused you to reject Airtable the first time?

My data model, if normalized for SQL would be too cumbersome, too many little tables. I didn’t think I could just store JSON in a string field. I’m still not convinced it’s great but I don’t really need to search these objects so it might work.

As an example, in my model I have a string of text. Each word of this string in turn has 3 attributes. In between words I can also add a pause or audio. I can also indicate that a word is to be spelled out. It’s eventually turned into a special version of SSML for speech synthesis.

I played with Firestone a bit but didn’t love it.

At some point I want a large hunk of the data model to fit into a single document for editong. Imagine something for writing vocal scores. I am investigating Prosemirror for this which is also tempting me to look more deeply at Notion.

I teeter between nocode and all sorts of code… can’t seem to find what feels best here.

Yep - I’m familiar with it and Airtable is certainly not the most ideal string-handling platform unless you abandon the “notion” of a codeless (or low-code) solution. Once you embrace scripting in Airtable, the sky becomes open and bright and a custom [React Javascript] app would be very satisfying. But, it comes at a relatively steep development price.

Notion continually raises the bar. They recently released their API and it’s pretty solid. But, I think even notion will struggle with many of the string and array issues.

Opinion…

These no/lo-code platforms need to embrace the idea that javascript should be able to be used to extend formulas. If they would simply make it possible for power-users to prototype new formula primitives based on javascript, the vast demands for missing formula features would evaporate and everyone would have exactly what they need. Developers would rush in to help everyone who critically needs a missing formula; split(), for example, could be implemented in minutes. This narrow thinking and near-sighted lack of extensibility are constraining adoption.

100%
User defined functions would allow the community to solve these problems.

I’m committed to learning more.