Accessing Properties in a Structure - adobe-dmeservices/custom-metadata GitHub Wiki

In many scenarios, Asset Managers leverage complex Structures in their metadata strategies. We recommend using the Structure property, which is very flexible and can display most supported property types in a structure. However, there may be cases where you want to include a property from a structure in a non-Structure context.

To display and edit values from properties in a Structure, following format must be followed:

  1. Select an option for Field Type
  2. Create a Display Name
  3. Obtain a Prefix and a Namespace from the File Info
    1. This subject was covered in a previous section.
  4. Format the Property Name as: **[Parent Property Name]/[Prefix]:[Property Name]**
    1. Note: It is typical but not required to use the same Prefix here as in step 3
    2. Do not include the braces around the Property Name/Prefix values.
    3. You can target values inside of nested structures. The following Property Name will display data from a property nested two levels down from the parent:
      [Parent Property Name]/[Prefix]:[Second Level Property Name]/[Prefix]:[Third Level Property Name]/[Prefix]:[Property Name]
    4. Structures can be arrays. To target a specific array item, you can append [Item Number], including the braces, to the Property Name. The following will display data from the second item in the MyStructure array:
      MyStructure[2]/MyPrefix:MyProperty
      Note: Displaying array values is risky, as there is no guarantee that a particular value exists. Furthermore, if you attempt to write data to an array value greater than 1 and there are no defined values between 1 and your value, the write will fail. XMP Arrays count starting with 1, so the first item in an XMP Array is 1, not 0.

We strongly recommend using the Structure property if you need to display items in a Structure array

  1. Click Save

    Implementing Structs

  2. Custom Metadata Panel will now write the following in XMP. This can be seen in the File Info.

    Code for Structs