Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

How to increment whenver a new record is created in Another table

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

I have 2 tables in my base . Table 1 have multiple records while table 2 only has single record . Table 2 has a field (lets say voucher)  with data type number. Whenever a new record is added in Table 1 ,I would like to Increment the value of a field (voucher ) with 1.

1 Reply 1
Alexey_Gusev
13 - Mars
13 - Mars

Hi,
Link all table1 records to the table 2 record (fill first by hand, then copy-paste it to the whole column).
Use Count field type in table 2. 
Create automation that will trigger in table 1 when record match condition - link is empty.
Set action - fill link field with static value (linking to the record in table2)

If you need to preserve your 'voucher' number field, add second action - copy value from count to voucher.