to filter for the two fields at the same time?

Post Reply
Ralf
Posts: 78
Joined: 19 Jan 19 14:37

to filter for the two fields at the same time?

Post by Ralf » 04 Nov 20 1:55

In the view under the thumbnail, among other things display the little hints below
% code if Catalog.ImageHasXMPProperty (ImageItem, 'ics: AreaTags') then result: = '<FONT color = "# 00324A" bgcolor = "# FF0000"> AREA </font>';% / code
% code if Catalog.ImageHasXMPProperty (ImageItem, 'Iptc4xmpExt: PersonInImage') then result: = '<FONT color = "# 00324A" bgcolor = "# 80D6FF"> PERS </font>';% / code
Is it somehow possible to filter for the two fields at the same time, so
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Hert
Posts: 6437
Joined: 13 Sep 03 7:24

Re: to filter for the two fields at the same time?

Post by Hert » 05 Nov 20 11:20

Not sure what you're trying to achieve here? You want the same output but differently?
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Ralf
Posts: 78
Joined: 19 Jan 19 14:37

Re: to filter for the two fields at the same time?

Post by Ralf » 05 Nov 20 12:46

yes, that was a bit awkward. The fields are not relevant, they were just an example. My aim is to check and display 2 fields (no matter which ones are currently needed)
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Hert
Posts: 6437
Joined: 13 Sep 03 7:24

Re: to filter for the two fields at the same time?

Post by Hert » 05 Nov 20 13:44

You mean something like this?

Code: Select all

%code 
  result := '';
  if PublicCatalog.ImageHasXMPProperty(ImageItem, 'ics:AreaTags') then 
    result := result + '<FONT color="#00324A" bgcolor="#FF0000"> AREA  </font>';

  if PublicCatalog.ImageHasXMPProperty(ImageItem, 'Iptc4xmpExt:PersonInImage') then 
    result := result + iif(result = '', '', ' ') + '<FONT color="#00324A" bgcolor="#80D6FF"> PERS  </font>';
%/code
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Ralf
Posts: 78
Joined: 19 Jan 19 14:37

Re: to filter for the two fields at the same time?

Post by Ralf » 06 Nov 20 9:46

yes, exactly that. Thanks I can go on with that and make my life easier.
Great hobby and software :)
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Post Reply