I think two things are getting confused here. $IDString is nothing more that a unique string encoded from the ID number. The aim is that the resulting string is less prone to occasional mishandling of the ID as a number, i.e. you don’t want some process to multiple $ID twice and use the result as an ID. So for general use the IDString is the same as a ID just expressed differently. The ID never changes, so the IDString can’t (as it is based on the ID).
So the assertion here is false:
Both those examples point to the same thing. What you are overlooking is the NoteURL uses the -in-TBX-document path. For the note on $NoteURL the $NoteURL is:
tinderbox://aTbRef-95/?view=outline+select=1448512291
But that’s because the current view is at root. If I hoist the container ‘System Attribute view’ and repeat the process I get the path:
tinderbox://aTbRef-95/A%20Tinderbox%20Reference%20File/Automating%20Tinderbox/Coding/Use%20of%20Attributes/Attribute%20Listings/System%20Attribute%20List?view=outline+select=3420021570
The syntax you see is
- (open) Document name (minus '.tbx. extension :
tinderbox://aTbRef-95
- container path:
A%20Tinderbox%20Reference%20File/Automating%20Tinderbox/Coding/Use%20of%20Attributes/Attribute%20Listings/System%20Attribute%20List
- view type for container:
?view=outline
- selected item(s) in that view:
+select=3420021570
Your path issue relates to bullet #2 above, yet changing $ID to $IDString only affects bullet #4
It look like your process failure is not ID, but but because the note described from ID has moved from the path at which it was recorded. Using a simpler version than above let’s assume we have a note $Name “Patient Review
”, $ID 2920021571
at $Path “/Projects/Trial X/Patient Review
”. Looking at the note in the map “Trial X”, the $NoteURL is:
tinderbox://untitled/Projects/Trial%20X?view=outline+select=1678642209;
If I move the note to container “/Projects/Trial Y
”, a NoteURL-based call will fail as there is now no item with $ID 1678642209
in the map (i.e. container) “/Projects/Trial X
”
Visually:
One suggestion. If Tinderbox gets a tinderbox://
call where the ID is valid but the path is not, that the doc uses a root-level outline and selects the ID (expanding a branch as needed). The user can then adjust the tab’s view type/scope as needed. If the target is a multiple selection, do the display based off the first ID and select any other valid IDs regardless of location.
TL;DR. The problem is not the ID/IDString but the -in-docpath to the item (if any) embedded in the noteURL.