Repeatable Tag Sets - Null Entries Create Issues

Started by PandDLong, April 06, 2024, 09:08:55 AM

Previous topic - Next topic

PandDLong

Scenario:  For photos of art, I choose the Artwork or Object Tags from IPTC Extension and I elect to use Title, Creator and Content Description - in that order. I have a photo with 5 pieces of art and I do not know one of the artists and there is no description for another piece.

Tag-Set:
Using a metadata panel for the Tag Set, I enter the information such that the Artwork or Object panel looks like (screenshot would not show up here so I am improvising).

   First; John; Boat
   Second; John; Tree
   Third; Mary;
   Fourth; ; Boat
   Fifth; Abdul; Mountain

But when I complete write-back, the null/missing values are shifted such that the description Boat is added to the third entry and Abdul & Mountain are duplicated to the fourth.  If I enter the data in the other order (I enter First first and Fifth last such that First is at the bottom of the list) the outcome is different again (Tag Set 2). Screenshots attached for both situations.

Individual Tags:
Using a metadata panel but using the three individual tags and entering the content delimited by ; - I get a different result than using the tag set. The shifting occurs but no duplication.  In the screen shots I show the data as entered and after write back looking at it in the tag set (to be easier to compare to the other screen shots).

Metadata Template:
Using a metadata template to populate the three individual tags (entering the data as ; delimited lists the same as in the individual tags panel) gives a third result.  The big difference being that the duplicate entries in each tag are also removed which mixes up the result considerably.


I believe the results using individual tags in a panel and a template are consistent with the behaviour of repeatable tags in general (https://www.photools.com/community/index.php/topic,14077.msg99008.html#msg99008).  Using a Tag Set solves some - but not all - of the repeatable tag issues (and is easier to read), however, it is not directly comparable to using the individual tags (perhaps this point is just something to identify in the help documentation).

While I posted about repeatable tags in the General Section of the forum, I think this handling of tag sets even when using the structured panel fits the description of unexpected behaviour. Given it occurs on write-back perhaps it is an exiftool issue (I have not tested this situation directly with exiftool stand-alone).

Happy to provide more info as desired.

Michael













Mario

Show us what IMatch sends to ExifTool when you write back.
Open the View menu > Output panel before the write back.
Write back.
Select everything in the Output Panel with Ctrl+A, paste into Windows Notepad, save to a file and attach it here.

Structured tags are very complex, not many users use them, if at all, and adding repeatable data with gaps adds extra complexity on top. For IMatch and ExifTool. Not sure, let's see what output IMatch produces in your case.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

PandDLong


I well imagine that structured tags are very complex...  

I have attached a screenshot of before and after write back and the contents of the Output panel.

I relooked at the help documentation and noticed that in the 'Custom Panels for Tag Sets' section you specifically state that if you don't use a custom panel for the tag set you can't have a null value in one of the tags.   Which means my example of using 'Individual Tags' is specifically stated as n/a in your documentation.  

<<
You could add the tags you want to fill from these sets into a custom Metadata Panel layout. But that would require you to use ; to separate multiple entries (e.g., ArtworkTitle) and to manually ensure that each tag has the same number of values. Doable.
>>

If this issue is not worth addressing in terms of time/effort for the low usage of tag-sets, then I suggest that you just add a tip/warning to the documentation stating that you must provide a value for every tag within the set (users - like me - can mitigate the issue by entering a value like unknown/none/na etc).

I hope this is helpful.

Michael

Mario

Looking at your "with Null" output, IMatch sends the following iptcExt:ArtworkOrObject to ExifTool (I've converted it into JSON for easier validation and reading):

[
    {
        "AOContentDescription": "Mountain",
        "AOCreator": "Abdul",
        "AOTitle": "Fifth"
    },
    {
        "AOContentDescription": "Boat",
        "AOCreator": "Mary",
        "AOTitle": "Fourth"
    },
    {
        "AOContentDescription": "Tree",
        "AOCreator": "John",
        "AOTitle": "Third"
    },
    {
        "AOContentDescription": "Boat",
        "AOCreator": "John",
        "AOTitle": "Second"
    },
    {
        "AOContentDescription": "Boat",
        "AOCreator": "John",
        "AOTitle": "First"
    }
]

which is I guess is because you have 5 elements for each tag set, except for the one with the the null, and the data is just deal with that way. I haven't looked at this code for months and I don't have the details in my head anymore.

I shall look into this when there is a longer free time slot. IMatch should probably handle that better, but so far you're the only user reporting this, and when I recall, the weeks-long project with structured tags was started by ArtwoprkOrObject back before IMatch 2023. So this may be very well a problem only very few users will encounter, if ever. Which makes this a lower priority issue.

Until then, I suggest you try not to use null values. Maybe just add a blank or a ? to indicate missing data.

The same will probably happen if you access the tags directly and work with multiple values using the ; list syntax.
If you add two elements for one tag, but four elements for the other tag part of the structure, the omissions may cause unwanted side effects.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

This has been resolved for the next IMatch release.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook