Can you get/find a single global attribute value with the API?

Started by dnovak, October 25, 2018, 03:32:10 AM

Previous topic - Next topic

dnovak

Hello,

I maintain artist/photographer data in a global attribute set (contact information, URLs, etc).

I'd like to retrieve this data for an app I'm building, but can't find a way to get just one global attribute value with the API.

I can work with getting the entire set on load, but I'd prefer to avoid the overhead of getting the whole table for each image.

I see you can lookup related data in global sets, e.g. {File.AT.Info.Client.Name}.  Can you do something similar when the 'lookup' value is in a metadata attribute like  {File.MD.XMP::iptcExt\ArtworkOrObjectAOCreator\ArtworkCreator\0}

I could work with attributes exclusively, but I'm trying to relate metadata to global information.  For example, I may want to relate keywords to a controlled vocabulary with descriptions.

Thanks,

Dan Novak

Mario

No. Global Attributes are always returned completely. There is no mechanism for selecting individual records.

Downloading entire Sets is usually an operation that takes only a a few ms (even for thousands of records!) and then you have all the data available for your app.
You can then use whatever JavaScript function you favor to select the data you want from the download list of Attribute values. You can keep it as long as your app runs and use that as a convenient cache.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

dnovak

Thanks!   I'm doing that now and it's working quite well.