"Can’t save field because it exceeds the limit of formula dependencies"

Hi Airtable folks. I’m wondering if anyone has run across this message when writing Formulas in Airtable:

“Can’t save field because it exceeds the limit of formula dependencies”

This happened when I was splitting-out 100 image URL’s into individual fields. Everything worked fine until I tried to submit the 99th image Formula.

Here are screengrabs of my Formula, in case anyone sees an inconsistency. I highlighted in RED where I made additions/changes. But again, images 1 through 98 worked just fine:


Looks like you’ve hit some kind of limit on the number of columns you can refer to in a formula. This is my guess looking at the error message, you can contact Airtable support to confirm.

I’m not sure what problem you are trying to solve with Airtable but 100 columns sound like a lot. Is it possible to convert those columns into rows?

Yes, as @Raminder_Singh said, your images should be in rows, not fields.

Thank you both for your replies! I will contact Airtable support.

I will also consider converting the columns into rows (though I’m not sure how, yet), but that appears to greater complicate my use case — partially because it exponentially reduces my maximum # of 50,000 records per base, but also because it would require me to have to create a unique table of image attachments per user (and I expect to have 500 to 1,000 users). Which I think would make for a messy Airtable base to administer.

And @ Raminder_Singh, since you were asking about use-case:

  1. I’m using Airtable forms for my users to update their profile on Webflow. Each Airtable row will be for one, unique user.
  2. They will be uploading from 25-100 images at a time to an Airtable form.
  3. In order for these to update Webflow CMS’ multi-image fields (which max out at 25 images), I need to split my Airtable uploads into groups of 25. Asking the users to have to split this out on their end is not good usability (I could explain if you’re curious), which makes it harder on my end.
  4. I have not been able to figure out how to directly split, say, 75 images into 3 Airtable fields of 25 images each. Airtable support couldn’t provide a solution, instead suggesting that I post to the community — which I did, in a separate Airtable community discussion but no one replied and it’s been a few weeks.`
  5. I did, however, figure out how to split those 75 images first into individual fields. Thanks to @Kuovonne’s super helpful formula from this Airtable community discussion. FYI: I first had to convert my image attachments to URLs.
  6. Then I am able to recombine them into Fields of 25 images in Airtable.
  7. Then I can export them (using Integromat) to Webflow.
  8. Phew.

Here’s what you can do to simplify the process down a bunch using an Automation. This assumes you have 4 Multiple Line Text fields that the Automation can copy no more than 25 links into.

  1. Trigger an Automation to run when the {Attachment} field gets updated.
  2. Add a Run a script step that has two input config variables: recordId which should be the ID of the trigger record, and links which should be the list of URLs from the trigger record’s {Attachment} field. Use the following script:
let table = base.getTable("Name of Table")

let {recordId, links} = input.config()
// Rename each item in the below array to match the names of the fields of your base
let fieldsToSplitAmongst = ["Batch 1", "Batch 2", "Batch 3", "Batch 4"]

let maxPerBatch = 25

let recordUpdates = Object.fromEntries(fieldsToSplitAmongst.map((field, index) => {
    let batch = links.splice(index, (maxPerBatch * (index + 1)))
    return [field, batch]
}))

output.set("recordUpdates", recordUpdates)
  • The output of the above script will return something like this if the record had 40 attachments:
{
   Batch 1: Array(25),
   Batch 2: Array(15),
   Batch 3: Array(0),
   Batch 4: Array(0)
}
  1. Add a Update record step to update all "Batch" fields with the values from the output of the script. Note: The script can be modified to handle updating the record from within the script to avoid having this step.
2 Likes

Wow, I’m really impressed that you scaled up the formulas that far. I never had the patience to go past about 30. Thank you for posting your findings.

Airtable formulas do have limits, even though they are far higher than needed for most use cases. This thread has another example of reaching the limits of a formula.

In general, if you find you are approaching the limits of what a formula can do, I strongly recommend looking into scripting or an alternative base design.

1 Like

Thanks, @kuovonne! I was able to get this far, thanks to you! And yes, it took a few hours because I’m not a developer and don’t have crazy automations to repeat items automatically. I copied and pasted the old fashioned way, from a text editor — which was a lot easier to do/see than editig the formulas within Airtable. I’m also talking with Airtable tech support now, and the engineers are reviewing if this can be improved upon.

Thanks so much, @ Kamille_Parks! If your method works this would be very useful. I’ll try it out and let you know!

I tried it, but the test output failed in the script editor. I’ve never created an Airtable script so it’s possible that I didn’t update the right part. I just replaced “Name of Table” with the actual name of the table, in the quotes. I also created 4 Multiple Line Text fields, and named them “Batch 1”, “Batch 2”, “Batch 3”, “Batch 4” just to keep it simple for now. Was I also supposed to replace “recordID” and “links” from an actual record?

Here’s the error message:

Here is a screenshot of the code line #'s, in case that helps understand the error message:

You need to create them as input variables to the scripting automation. Those are the names of the variables, and you will select the values from the record in step 1. Kamille gave more details in her post with the script. Note that this script is designed to run as an automation, and not from a button in scripting app.

As Kuovonne reminds, this is an Automation script, not one for the Scripting app.

You need to add input config variables for the script to work. That’s done in the left side of the screen. The script is set up for two input variables, recordId and links. Notice that the variables within the script of the same name have a red squiggle underneath them. Once you add the input config variables it should be fixed.

Thanks, and FYI that I was always using this script within an Automation. I added the input variables, but still get the same error message — now it’s “splice” that has the underlined red squigglies. Does “splice” need input variables as well?

Your screenshot only shows a single script input for recordId, you need one for links too.

Thanks. How do you do that (sorry, I’m a noob)? I had created an input variable for “links”. Here’s my whole scripting screen, within the automation:

The value for links should be the trigger record’s Attachment field’s list of URLs

Thank you. I will try this out.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.