Copy link to clipboard
Copied
Hello everyone
Now you need to display your own field with a drop-down list of system metadata in the metadata field.
That is, there is a table "licensor" in it there are several values. The goal is to display these values in the list and make it possible to select one of them using the "enum"field.
local f = {}
function f.test( oneLrPhoto )
local temp = oneLrPhoto:getFormattedMetadata("licensor") or ""
local data = temp[1].LicensorName
return data
end
I enabled it in the file where the list of my tags is generated
local LrApplication = import("LrApplication")
local catalog = LrApplication.activeCatalog()
local selectedPhoto = catalog.targetPhoto
require 'coreFunction'
local test = f.test(selectedPhoto)
and formed a new tag
photoMetadata[#photoMetadata + 1] =
{ id='cm_test', version=0, title = LOC "$$$/CustomMetadata/Fields/CM=ТЕСТ ", dataType='enum', searchable=true, browsable=true,
values = {
{ value=nil, title = tostring(test), },
} }
in .lrtemplate registered a new tag
As a result, it doesn't work. The only thing I was able to achieve was to output local Identifier in the same way via the following function
local f = {}
function f.Identifier( oneLrPhoto )
local id = oneLrPhoto.localIdentifier
return id
end
But also with the 'enum' type. ID shows without problems, but only one for all photos. (For the selected LR when loading)
As I understand it there is no way to output data in one tag from another?
Copy link to clipboard
Copied
Have you seen this from John Rellis?
Copy link to clipboard
Copied
Yes, thank you!