Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Adding + 1 to a field in Table A when a new record is added to another in Table B

Topic Labels: Automations
257 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Yada
4 - Data Explorer
4 - Data Explorer

Hi there, 

 

I'm pretty new to Airtable so forgive me if the answer is straightforward.

 

I'm trying to set up the following automation:  When an entry in table B has Field A = X and Field B = Y then update Table A, Record Z, in Field "Dernier numéro de facture" by changing its value to {Dernier numéro de facture} + 1 (so incrementing its value by 1)

 

What should I enter in the Field highlighted in the image attached? I tried {Dernier numéro de facture} + 1 but it outputs a "Could Not parse number" error although last invoice number field is a # Number.

 

Thanks!

1 Reply 1

Ah we can't do math inside the automation like that I'm afraid.  You'll need to:
1. In Table A, create a new formula field called "Dernier numéro de facture + 1" and give it a formula of `{Dernier numéro de facture} + 1`
2. In your automation, use a "Find Record" automation to look for the record you need to update
  - You could do this by creating a formula field to display the record ID, and then look for that record
3. In your automation, use an "Update Record" automation for the record you want to update, and use the result of the "Find Record" action, using the value of "Dernier numéro de facture + 1" to update "Dernier numéro de facture" 

--
You could also try using a Count field with conditionals on it, but that would update the number if the linked invoice conditions changed and I don't think you want that?