Can a file variable be added that provides the datetime stamp for when the metadata was last changed in the database for the file?
This data is in the History panel but can't be accessed by a variable (at least I didn't find it listed in Help nor the Variable Selector and I did a few attempts in VarToy with various spellings - but I expect it isn't exposed to the variables capability at all).
Thanks for considering.
Try
function getHistoryData() {
IMWS.get('v1/files', {
idlist: IMatch.idlist.fileWindowSelection,
fields: 'id,name,history',
}).then(function(r) {
if (r.files.length > 0) {
resultJSON.html(JSON.stringify(r, null, 2));
});
};
});
};
The JSON will look like:
{
"files": [
{
"id": 4089,
"name": "20060530_162411_1234.jpg",
"history": [
{
"event": {
"type": 1,
"name": "added",
"id": 4089,
"id2": 0,
"dateTime": "2019-02-24T12:20:47",
"title": "",
"text": "",
"user": "Ger"
}
},
{
"event": {
"type": 2,
"name": "updated",
"id": 4089,
"id2": 0,
"dateTime": "2019-02-24T12:21:12",
"title": "",
"text": "",
"user": "Ger"
}
},
{
"event": {
"type": 60,
[...]
Does {File.MD.XMP::xmp\ModifyDate\ModifyDate} not work for you? Or the shortcode {File.MD.modifydate}?
File.MD.modifydate seems to correspond to when metadata is last modified in the file. ie. it corresponds almost exactly to 'Updated' in the History panel.
I was hoping for the datetime corresponding to 'Metadata changed' in the History panel.
I haven't done any scripting yet with iMatch - perhaps it is time to start...
Michael
Yes. IMatch does not maintain separate variables to keep track on when you modified metadata of a file in the Keywords Panel, Metadata Panel or by one of the many other means.
The history is not accessible via variables (complex struct, never requested) but via the v1/files endpoint.
The history is one of the most overlooked features in IMatch for 'normal' users - it was added initially for commercial and institutional users.