Formula issue with creating new record on table

Hi, my issues it that I’m trying to create a duplicate row to a table.
Things I have tried.
1 using grist api for records
https://{subdomain}.getgrist.com/api/docs/{docId}/tables/{tableId}/records
2 I have also tried grist.docApi.applyUserActions(actions); from the action button example… but it’s also not working for me
The issue according to me is that the data for the formula field is not passed correctly or it’s just that formula fields can’t be updated with api

The error returned from the api
{
“error”: “Error manipulating data: [Sandbox] ValueError Can’t save value to formula column CollumB”
}

Hey Guys :slight_smile: What’s the issue here? is my question answered previously? Is it in the wrong place ? Is it incorrectly asked or just no one can’t help me?

Sorry if I don’t understand you correctly, but I use api alot but formulafields can’t be send by api. So if you have a field in Grist with a formula, dont try to fill this field with the api. Grist will fill this for you. Unless it is a trigger formula, those fields can be filled with api (and now I see the error message, thats exactly what I say. If you don’t want to change the api, then make the formula field a trigger formula field).

Thanks for the answer. My guess was also that i can’t fill formula field with api.
I’m trying to duplicate a row and this is the issue that I’m facing.
The formula fields take data from other tables so my other guess is that i have to somehow clone this reference to the other table but i can’t figure it out.

But such a formula can only work when it search for a record in the other table based upon a field in the record itself. The question is, which field. Maybe you can list all relevant fields in the table and the formula, but my quess would be that it should work…