Skip to main content
Participant
February 14, 2008
Question

Help with searching custom metadata tags

  • February 14, 2008
  • 3 replies
  • 802 views
I have written a Photoshop JavaScript for my employer which allows my users to enter custom information into metadata fields. My intention was to use Bridge to create a searchable asset management system for these files. However, I am running into several problems in allowing my users to search for images with the criteria that they are looking for.

My first thought was to create my own search dialog which then looks for files whose metadata matches the search criteria. I was able to do this and return an array of thumbnail objects, but to my surprise there does not appear to be a way to create a new window which shows these thumbnails? (without creating a new folder object and copying the files there which would tie up too many resources.)

My next thought was to create a custom namespace/panel for my metadata. This also works up to a point. I cannot seem to get my custom metadata fields to show up in Bridge's search or filter areas. I see the SDK example for creating search conditions for a custom node, but how can I modify search conditions for "normal" nodes (folders)?

I'm sure that many of you have run into these issues, there are several posts in this forum and others from people with similar questions. I'm not seeing much in the way of answers, however. Any information would be much appreciated.
This topic has been closed for replies.

3 replies

Paul Riggott
Inspiring
April 24, 2008
I am no expert, in fact a total beginer with Bridge scripting.
I have also found that it a problem displaying the required thumbnails. To get around this problem I have used the label rating, changing all the thumnails I don't wont to reject.
IE:
var items = app.document.visibleThumbnails;
for (var i = 0; i < items.length; i++){
var md = items.synchronousMetadata;
md.namespace = "http://ns.adobe.com/photoshop/1.0/";
if (md.Keywords != "") items.rating=-1;
}
This will only show thumnails that do not have keywords so long as the view "Show Reject Files" is not ticked.
I suppose if you used the rating you could copy them into a field that you could restore from.
As for the sorting I haven't done much with that except this sort of code should work on custom metadata.

new SortCriterion("MyDateSort", "date", "http://ns.adobe.com/xap/1.0/", "CreateDate");
var mySortObj = {};
mySortObj.name = "MyDateSort";
mySortObj.reverse = false;
var mySortsArray = [];
mySortsArray.push(mySortObj);
app.document.sorts = mySortsArray;
Participant
March 14, 2008
Hi guys,

I am facing the same challenge that you are and have just posted the following in a separate thread. I'll keep you posted on my progress. Thanks.

Hi,

Any help with the following would be greatly appreciated. I have created a custom xmp metadata panel that I am using for assets for a client. In Bridge, is there a way to use the Find tool to search for my custom metadata fields (as compared to the "All Metadata" search or generic metadata category searches)?

Also, is there a way to save these searches for future use or set up a filter based on custom xmp metadata? Similar to how Bridge's built-in keyword filter works but for custom metadata. It would be great if this could work similar to the current filter palette instead of using the Find tool every time.

Thanks so much!

Josh
Participant
March 10, 2008
It seems to me that we are working on the same project. I have created a custom panel, and can export the metadata from it, but cannot filter or sort on it.

Is this the file we need to be looking at:

C:\Program Files\Common Files\Adobe\Scripting Dictionaries CS3\Bridge\omv.xml

?

Paul