Attribute Data Type:
Attribute Default Value:
Attribute Inherited from Preferences?
Attribute First Added:
Attribute Last Altered:
The internal unique ID of the item and is a large arbitrary whole number (read-only, not sequential numbers).
Although set to no value (0) by default it is immediately populated with the items UID. The $ID UID number is unique within a TBX.
$ID opens a number of possibilities for export, including making HTML anchors for linking to includes in exported pages but note the newer $IDString offers a more robust alternative for new code.
An object dragged or copy/pasted to a different TB acquires a new $ID, as this ensures the UID is unique in the new location (i.e. its existing source $ID might already be allocated in the receiving document).
As the newer $IDString may be used interchangeably with $ID, $IDString is suggested as the more robust choice when referring to IDs. Few users, except those using much/complex action code need to work with IDs. It is suggested to use $IDString for new code, but do not rush to update all existing code from $ID to $IDString unless there is an indication it is needed.
Alaises and IDs
IDs of aliases do not persist between sessions. In other words, if a note X has an $ID of "3219936174" today, it will have the same ID next week, but aliases of X might have different IDs. Aliases created by agents may change IDs at any time. However, aliases inside inactive agents do retain their ID value, unless/until the agent is re-activated. As $IDString is calculated from $ID, the same limitations apply.