Skip to main content

Auto-Incrementing Number

Inserts a number incremented by a specified step after each expansion.

Parameters

1️⃣ Initial Value (default: 1)

The initial value - the first number that will be inserted.

2️⃣ Step (default: 1)

The step by which the number will be incremented after each expansion.

Syntax

{@auto-inc-number|2|3@}

The snippet above will insert the following numbers when expanded: 2, 5, 8, 11, 14, etc.

Notes

This is the only placeholder that modifies the snippet content after the expansion.

Using the example above, after the first expansion, the snippet will look like this:

{@auto-inc-number|5|3@}

Use Cases

Anything that uses sequential numbers, like:

  • document versions
  • invoice numbers
  • file names
  • SQL queries
  • etc.

Example

Sample snippet generating an email subject with an auto-generated invoice number:

Invoice INV/John/{@auto-inc-number|20|1@}/{@calculated-date|0|yyyy|English@}

This example will insert the following text when expanded (assuming that today is 2024-07-01):

Invoice INV/John/20/2024