Help

Re: How to increment number field via the API

Solved
Jump to Solution
602 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Paul_Bouisset
4 - Data Explorer
4 - Data Explorer

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
Erin_OHern
6 - Interface Innovator
6 - Interface Innovator

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
Erin_OHern
6 - Interface Innovator
6 - Interface Innovator

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