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

Custom Metadata/ dataType enum value does not appear as < mixed > for current selection

Advocate ,
Mar 13, 2025 Mar 13, 2025

For the SDK experts.
I have created a Custom Metadata and chosen dataType "enum" 
values for this metadata are "true" or ""


When multiple photos are selected AND one but not all of them have this metadata I do not see the typical < mixed > state in the panel for the current selection (I have set "Selected Photos" filter)


Is there a trick to make the < mixed > state appear?

.

TOPICS
macOS , SDK
440
Translate
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 2 Correct answers

LEGEND , Mar 13, 2025 Mar 13, 2025

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

It looks like the Metadata panel never shows "< mixed >" for fields of type "enum".  Instead, when the values in the selected photos are mixed, it either shows no value at all or it shows the enum title that's been assigned to "value = nil".

 

As a test, in the Metadata panel I set IPTC >  Copyright Status to Copyrighted for one photo and to Public Domain for another. When I select bo

...
Translate
Advocate , Mar 14, 2025 Mar 14, 2025

@johnrellis 

More problems.

 

I set the second value to nil
In the filter all photos that don't have "value 1" appear with the title associated to that nil e.g. "No"

In the metadata panel they also appears as "No"


• In the Metadata panel I selected 2 photos, one with value 1 and one with nil


At this point is not possible to set  all selected images to nil via the Metadata Panel because LrC thinks they already are at nil.

My solution: use "" instead of nil.
Metadata Panel will NOT show < mixed > state but

...
Translate
LEGEND ,
Mar 13, 2025 Mar 13, 2025

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

It looks like the Metadata panel never shows "< mixed >" for fields of type "enum".  Instead, when the values in the selected photos are mixed, it either shows no value at all or it shows the enum title that's been assigned to "value = nil".

 

As a test, in the Metadata panel I set IPTC >  Copyright Status to Copyrighted for one photo and to Public Domain for another. When I select both photos, the panel shows Copyright Status: Unknown:

johnrellis_1-1741889958557.png

 

I defined a plugin field of type "enum" with two values, Value1 and Value2. When I set one photo to Value1 and the other photo to Value2, the All Plug-in Metadata tagset shows nothing:

johnrellis_0-1741889867552.png

 

I modified the definition of the "enum" to include a third value:

{title = "My Unknown", value = nil}

Now, when I select the two photos (with Value1 and Value2), the metadata panel shows My Unknown:

johnrellis_2-1741890333727.png

 

Translate
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
Advocate ,
Mar 13, 2025 Mar 13, 2025

@johnrellis

Thanks.

 

I feared I had to do a third value.

I was hoping LrC could handle this basic scenarios.

 

Perhaps I can set the second value to nil instead of ""

But it I am not mistaken nil is not searchable.

 

 

 

 

Translate
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
LEGEND ,
Mar 13, 2025 Mar 13, 2025

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

"Perhaps I can set the second value to nil instead of "". But it I am not mistaken nil is not searchable."

 

In my quick test, the Metadata panel and smart collections can search for nil enum values:

johnrellis_0-1741893283759.png

 

 

Translate
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
Advocate ,
Mar 13, 2025 Mar 13, 2025

@johnrellis

Thanks for the check.

I am not back in front of my catalog and will try a few possibilities.

A third value works, and solves the issue in the metadata panel but then I get an extra entry in the search 🧐

The idea was to have a "Catalog Flag".
By doing

 

{ value = "", title = "No" },

 


What I get in the LrC search is actually the "No Value", which is what I want.

This convoluted method allow me to kinda remove the "Custom Metadata" with the advantage of returning an empty field in the Panel
So I can do : "No" form the drop down menu > photo appears as "No" > I change photo > come back to previous = Metadata field is empty.

Screenshot 2025-03-13 at 21.05.35.png

In the filter that photo has "No value"

Mighty slick for the UI.
But no automatic < mixed > state like this.

.

 

 

Translate
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
Advocate ,
Mar 14, 2025 Mar 14, 2025
LATEST

@johnrellis 

More problems.

 

I set the second value to nil
In the filter all photos that don't have "value 1" appear with the title associated to that nil e.g. "No"

In the metadata panel they also appears as "No"


• In the Metadata panel I selected 2 photos, one with value 1 and one with nil


At this point is not possible to set  all selected images to nil via the Metadata Panel because LrC thinks they already are at nil.

My solution: use "" instead of nil.
Metadata Panel will NOT show < mixed > state but at elast it will allow to set all images selected to "" 





Translate
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