• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

setRawMetadata to table

Participant ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

Hi. I want to write data to table fields, for example, registryId.

From API Reference Lightroom SDK 8.0:

photo:setRawMetadata( key, value )

Sets metadata for this photo.

Parameters

1. key
...
registryId
  • : (table) Both a Registry Item ID and a Registry Organization ID to record any registration of this item with a registry. Each element in the table is a table that is a structure named RegistryEntryDetail, as defined in the IPTC Extension spec.

But,

photo:setRawMetadata(("registryId")[1].RegItemId, 1)

not work...

I tried a lot of options, changing the position of brackets, quotes, but did not find any working(

Please tell me how to write data to a certain field in the table and overwrite it if it is already there.

TOPICS
SDK

Views

498

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 08, 2019 Apr 08, 2019

Here's what a valid value for "registryId" looks like:

The value is an array of tables, each such table containing the keys RegItemId and RegOrgId. Here's an example of how to set "registryId":

local value = {{RegItemId = "Item 1", RegOrgId = "Org id 1"}}

photo:setRawMetadata ("registryId", value)

Votes

Translate

Translate
LEGEND ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

Here's what a valid value for "registryId" looks like:

The value is an array of tables, each such table containing the keys RegItemId and RegOrgId. Here's an example of how to set "registryId":

local value = {{RegItemId = "Item 1", RegOrgId = "Org id 1"}}

photo:setRawMetadata ("registryId", value)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 09, 2019 Apr 09, 2019

Copy link to clipboard

Copied

LATEST

Thanks!)))))

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines