Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How to increment number field via the API

Topic Labels: API
Solved
Jump to Solution
1049 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, is there a way to increment a number field via the API ?

Something like:
base(‘Variants’).update([
{
id:id,
fields:[
my_number_field: increment(1)
]
}
])

I would like use the API to perfom an update without pulling the previous value first.

1 Solution

Accepted Solutions

Hi @Paul_Bouisset!

Great question – this type of update isn’t currently supported by the API. You will need to get the existing field value, increment, and then pass the new value in your API update call.

Sorry this isn’t the answer you were looking for, but I hope it helps!

See Solution in Thread

2 Replies 2

Hi @Paul_Bouisset!

Great question – this type of update isn’t currently supported by the API. You will need to get the existing field value, increment, and then pass the new value in your API update call.

Sorry this isn’t the answer you were looking for, but I hope it helps!

Thanks for your reply! That would be convenient but I was expecting this answer