Design & Print question

Started by bonsai, June 20, 2018, 06:46:56 PM

Previous topic - Next topic

bonsai

In "Design & Print" I'm trying to print/display some information of aircraft images with a dynamic template.
Among others there are hierarchical keywords like Aviation|Aircraft|xxx
eg   Aviation|Aircraft|Airbus A320-214
   Aviation|Aircraft|Airbus A340-642
   Aviation|Aircraft|Boeing 747-830
etc
Some aircraft have a name, I put them in xmp dc coverage.
With {File.MD.XMP::dc\coverage\Coverage\0} the print of the name works fine.
To print the aircraft type I tried {File.Categories|filter:^Aviation|Aircraft;level:leaf}
But if the image has a name of the aircraft, eg N.Vavilov, the result is "Airbus A321-211;N.Vavilov".
Why that? Can anyone explain this to me?

Mario

{File.Categories|filter:^Aviation|Aircraft;level:leaf}

Returns the leaf level of all categories starting with Aviation|Aircraft
What do you get when you paste this variable into the VarToy app and look at some of your files?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai

That's what I did, got the same result (Airbus A321-211;N.Vavilov)

Mario

Without seeing all your categories I cannot help. Somehow IMatch seems to find more data than you think.
Do you have a category N.Vavilov? Where is it located? ...
But to further analyze this I would need a database with the same categories your database has. And @Keywords cannot be exported because it is created from the data.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai

N.Vavilov is the meta data value in xmp dc coverage from this file as mentioned before.
There is no category for the name of the planes.
Another file has eg Hugo there and if it's a A321-231, then it shows A321-231;Hugo

Mario

#5
Categories variables cannot find metadata.
Please search your category tree for  N.Vavilov to see where it comes from. You can use the "Find" panel in the Category VIew (below the category tree) to search all categories.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai

Quote from: Mario on June 20, 2018, 08:14:20 PM
Categories variables cannot find metadata.
That's what I expected, but they do...

Please see attached screenshots for more information.

Mario

#7
The Categories variable has access to categories only. It cannot search the database for metadata.

Did you search your entire category hierarchy for the name? It must be in one of your categories. I guess a data-driven category somewhere.
If we can figure out which category it comes from, we'll know more.

Or you upload your database somewhere in your cloud space and I make some tests here.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai

There is one data driven category "Aircraft Name" based on Tag XMP::dc\coverage\Coverage\0.
If I delete this category the printout is ok.
But I can't see the logic.
I filter for Aviation|Airline;level:leaf, the last entry behind Airline, which is eg Boeing 737...
The data driven category "Aircraft Name" is a sibling of @Keywords, so why those values are found?

Mario

"@Keywords" is not considered when the regexp is used. It starts at the level below @Keywords (root of keywords).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai

But that doesn't explain to me why this value is shown also.
I have another data driven category, this value is not printed.
And how can I solve this problem?

Mario

Please upload your database and send me a link (and include a link to this thread).
We cannot analyze this further by guesswork. I need to see your category structure and run the regexp to see why it returns the results it returns. So far there was never a problem report.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai


Mario

Please allow for several days or even more before I can look into this. I'm still working on customer emails and problems from last week.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai

No problem, Mario, thank you.

Mario

I've received your database, thanks.

But, actually, this was not really needed. I'm just stupid, sorry

The correct expression of course would be:

{File.Categories|filter:^@Keywords\|Aviation\|Aircraft}

Starting with @Keywords (No special exception there) but since | has a special meaning in regular expressions, you have to escape it with a leading \ => \|

Without the leading \ the regular expression searches for Aviation or Aircraft....
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bonsai

Thank you so much, Mario!
Yes, this will do the trick.
But to get just the aircraft value it has to be:

{File.Categories|filter:^@Keywords\|Aviation\|Aircraft;level:leaf}

I've learned something new again  8)