How to update formula via API?

I use a formula, but one of the parameters is unknown. This dynamic parameter send via API.
I need to insert this parameter into the formula and get the calculation results of all rows. Thousands of rows in a table. DB hosted on the baserow.

I came up with 3 ways to do this, but couldn’t complete any.

  1. How to send parameter via API and insert it into a formula? Is it possible to update formula via API?

  2. Or can I update all rows or multiple rows in a table by API? With a single request.

  3. Or can I get link to a specific cell? Not a column. Without API.

  4. Maybe there is another way to achieve my goal?
    Without third-party integrations.

I will be grateful for your advices.

Hi @rg23, it’s only possible to use other fields as variables in a formula function. This is because Baserow must be able to recompute your formula when you change it, if we do an update on our side, etc. That said, you can, for example, create an additional field in your table, use that field reference in your formula, and use the update row batch endpoint to trigger multiple formula updates in one request. The maximum rows you can update per request are 200.

You can open the API docs by visiting REST API documentation // Baserow. After navigating to the Update row docs, you must click on the “batch mode” checkbox. There is a small video below as example.

Thanks for the answer!

I started doing it, but an additional question arose.
Is there any code to update all rows or filtered rows without all objects in the request body?
For example, assign all rows in the Name field the same value Alex:

"Name": "Alex"

And do you know where get link to a specific cell? Not a column field.
Thank you!

Hi @rg23, unfortunately, it’s not possible to update all (filtered) rows via one request. I do like the idea. Would you mind creating an issue for it on GitLab here:

Would you mind elaborating what you mean with linking to a specific cell instead of a field? You can make a link to another table using the “Link to table” field. This allows you to link a row to another row. Using the lookup field, you can join in fields from the related table.