adobe-dmeservices / custom-metadata

The home for a Custom Metadata Panel extension for Creative Cloud
https://exchange.adobe.com/creativecloud.details.103752.html
17 stars 8 forks source link

Dropdown value that sets multiple property values #39

Open xoogu opened 5 months ago

xoogu commented 5 months ago

Is it possible to have a single dropdown that sets multiple property values? As an example, on my previous panel you would choose a lens from a list, and this would then populate the MicrosoftPhoto:LensManufacturer, MicrosoftPhoto:LensModel, and aux:Lens values.

In a similar vein, is it possible to add scripting to the panel? e.g. if above is not natively possible I could add a script to do it? I assume this is possible since it is just a CEP panel, but imagine it might be difficult given the nature of the panel.

jameslockman commented 5 months ago

HI, xogu. Auto population has been something we've been thinking about, but the challenge for us is how to create a user interface that is easy to understand and use. We do offer the opposite, which limits choices based on one choice. You could have a set of dropdowns now that reduce their values based on another dropdown's value. The user would then need to select those choices in the other fields, but they would be limited by the first choice. See our example schema, where Breed is limited by Pet Type, and coat type is limited by breed.

Scripting is inherently dangerous, so we would need to approach that with extreme caution. We have considered a model where you could have a calculated value based on another value, but we need a way to offer this that also provides protections against attacks in the metadata itself. If we do this, it might solve your use case.

xoogu commented 5 months ago

Thanks, making MicrosoftPhoto:LensModel dependent on MicrosoftPhoto:LensManufacturer is how I'm making it at the moment, it's just a bit of a pain as I will also need to select the aux:Lens, which is just the previous 2 values concatenated with a space between. So 3 clicks instead of 1 plus more work in setting up the 3 option lists in the first place.

Another example is on my previous panel it would parse the lr:hierarchicalSubject value and convert this to keyword tags based on a hierarchical keyword format I used.

Or you might want to do something like add some script to have an address lookup based on the geo co-ordinates. Or lookup the geo co-ordinates based on the address.

It could be argued that this sort of thing would be better done with a custom CEP panel. But last time I worked with CEP and the XMP API (several years ago now) it wasn't that great. So using this panel where you've done all the work makes life much easier.