Special field for Note ID

Is there any way for my cards to include the Note ID or any unique identifier?

I’ve tried to use a special field, something like {{nid}} or {{NoteID}}, but nothing seems to work. Thanks!

Add note id can be used to add ID to the cards.
The original add-on is broken since Anki 23.10, so I created a simple Fork (copy) and uploaded it to AnkiWeb.

Thanks, that works well enough for my purposes, but the values are not what I expected. I am surprised to find out there are at least three different note identifiers:
(a) The numeric Note ID that is shown when I click “More => Card Info” while studying (for example, 1667709338460)
(b) The unique identifier that can be included when I export a deck to Notes in Plain Text (for example, F?]pNh5Lx?)
(c) The Note ID that is shown using the addon (for example, df1fc919-c5d7-11ee-b059-10b1dfd40ff4)

I wonder why these are all so different?

(a) and (b) are IDs created by native Anki.
The only ID created by this add-on is (c).

(a) Default ID, this is the time when the note or card was created.
(b) Random number generated by Anki, mostly used for deck sync.
(c) Generates a random number that is extremely unlikely to duplicate (UUID).

I think it’s possible to include (a) and (c) Anki’s IDs in the field if I customize the add-on.
But these IDs are generated after the card is created, so they cannot be displayed in the “Add” editor. Also, these IDs can be the same as someone else’s or changed by Anki, although probability is quite low.
This risk is almost 0 for the IDs generated by this add-on. Or, you can manually copy and set the same ID on multiple cards.

1 Like

Thanks, your explanation makes sense.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.