English > Scripts and Templates

Export template to view the internal "Database Record ID"

(1/3) > >>

svenne:
This is just a very small thing...

If you want to create a link to another movie in your database, did you ever wonder how to use "link type: ID"? The ID you'd need here is not the one from the "ID" field, but the unique one from the internal database index ("Database Record ID"). Just don't get confused!!  ;)

This "Database Record ID" is not visible in PVD.

How to create such a link in detail:
- select some text in the "Description" or "Comments" field (any custom fields should be fine, too)
- right click on the selected text and choose "Create Hyperlink"
- if you choose "Link type: ID", then "Value" has to be the hidden "Database Record ID" instead of the "ID" shown in PVD

Since I didn't find any other way to view the "Database Record ID", I wrote a very simple export template for that purpose (see attachment)

Move the template file "ID + Database Record ID + Title (Textfile).ptm" into the subfolder \Plugins\Templates of the PVD program folder. It will be listed in the menu "Export" after you restart PVD.

[attachment deleted by admin]

Ivek23:
Thank you for this one exports Database Record ID.

rick.ca:

--- Quote ---This is just a very small thing...
--- End quote ---

...and very interesting, but it just makes me wonder what the purpose of the link type is. I can't think of any situation where it would not be easier to use a title link. And a note of caution: I have no idea why, but using an ID link causes the viewdate of the target record to be reset. So it seems we have a bug in an obscure feature with an unknown purpose. :-\

svenne:
I don't use title links cause there are different movies with the same title, for example Dracula (with Bela Lugosi) and Dracula (with Christopher Lee) or 3:10 to Yuma, Dawn of the Dead, The Blob, etc.: original and remake... The Database Record ID is the only field that is definitely unique for each entry in the database.
The other thing is, ID links (aside from true URLs) were the only ones that could be exported in a way that they are not broken in the exported file(s) (even that needed some complex string replacements and some javascript, see "HTML Frames" export template).

The seen date of the target stays fine on my PC... Again one of those bugs hard to reproduce, only occuring with certain configurations?  :(

rick.ca:

--- Quote ---The seen date of the target stays fine on my PC... Again one of those bugs hard to reproduce, only occuring with certain configurations?
--- End quote ---

Are you using a skin that includes both viewed (the flag/date combo) and viewdate (just the date)?


--- Quote ---I don't use title links cause there are different movies with the same title...
--- End quote ---

I thought of that, but figured I would rather make my Title unique and use that, than get the mid. Maybe mid should be added to the skin engine so it's available for this sort of thing.

Navigation

[0] Message Index

[#] Next page

Go to full version