Task IDs (Notion)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

How to implement something like task IDs or card IDs in Notion, similar to Trello - Card-IDs (Trello)?

There seems to be no out-of-the-box solution, but there is a global ID for each entity.

Additionally, there are some workarounds that seem quite convoluted

Overview

Approaches to create task- od card IDs:

  • Manual
  • Global IDs
  • Notionthings.com: Create real IDs, from Global IDs + joined table
  • Datestamp-IDs: Create IDs based on creation datestamps of objects
  • NotionPlusID
  • API ?

Manual

Just add a field Task-ID or Card-ID and give it manually a number, when needed.

GlobalIDs

Rows of database tables do have a global ID. They can be retrieved with the function id(). They are quite long and unwieldly, like cef53e69b99d426f8ad5a00bd9f6e5f3.

Notionthings.com

Solution here from Notionthings.com. I think it's as impressive as it may be convoluted.

How it seems to work:

  • Create a database table used for ids only - id table
  • Relate a database table that needs IDs to this table
  • In the main table, have a rollup function that copies the id() value from the id table
  • Do some rollup stuff back-and-forth between these tables, that eventually count the number of commas that separate those ids
  • Use that count +1 as the id for the next row.

Let's see if there are easier solutions.

Sources:

Datestamp IDs

Derive an ID from the Created time date/time stamp. E.g.:

Step 1:

toNumber((prop("Created time"))

1674667620000
1674667380000
Etc.

Step 2:

toNumber((prop("Created time"))/10000

167466762
167466738
Etc.

Step 3:

  • Note that the timestamps are 9 character long
  • Keep the last 4 digits Unix Epoch Time
slice(format(toNumber((prop("Created time"))/10000),5)

6762
6738
Etc.

Issues:

  • There is about 0.7% change that multiple cards get the same ID, when your project has 70 cards
  • The sequence of IDs might cycle multiple times during the project, going from 9xx to 0yy, which might be confusing. To avoid this, you probably need 6 to 8 digits, which I personally think, is quite unwieldly.

See also

Sources