Any time that Notion releases a native function or feature that renders an old hack obsolete is a good day. Today is one of those days!
Without question, my hack for auto-incrementing table row IDs has been the most traversed post in the Notion Things blog. It was certainly a creative solution (and the only solution until now), but far from ideal. One of the drawbacks is that it can cause major lagging and slowness the more records you have in your auto-incrementing database. Another drawback is that the IDs aren’t static – if you delete a record from the database the remaining records will shift IDs. This isn’t good when you’re dealing with unique identifiers as you may be referencing those IDs from other locations within or without your system.
Move aside old hack. Welcome native Notion functionality!
Notion now natively supports unique identifiers that are auto-incrementing. It can be enabled on any database, and uses a prefix that is unique to the database (i.e. TASK-123). The prefix isn’t required, but recommended for the ID to be truly unique within your system.
How to enable unique IDs
To enable unique ID on your database, click the …
menu for the database, and select Properties
. Click + New Property
and select ID
. A prefix will be automatically generated based on the teamspace and database names, but users are able to change the prefix if needed. If the prefix looks good, click on + Add ID Prefix
. A prefix is not required to use the ID property, but it is recommended to make the ID truly unique and easy to reference.
- Prefixes are alphanumeric, between 2-7 characters, and are not case-sensitive. The prefix will always display in UPPERCASE. The same prefix cannot be used on more than one database.
- Each database is limited to one ID property. Once an ID property has been added to a database, you are not able to add a second one. Additionally, the ID property, unlike other database properties, can not be converted from or to any other property.
Some of my observations while testing unique IDs
- The ID is fixed – it cannot be edited or changed.
- Database searching by unique ID works great! Simply type a whole or partial number into the search field to filter to matching records.
- Even though unique IDs have an alpha prefix, the property is respected as numeric. This means that you can properly sort in ascending or descending order.
- You can create filters to reference the ID portion alone. There is no need (in fact, you will not be able to) reference the prefix using filter logic.
Some examples:
Where ID = 304
Where ID >= 300 And ID < 400