Auto Fill Template

Started by hluxem, December 05, 2023, 06:07:59 AM

Previous topic - Next topic

hluxem

I love using the autofill template to fill the location data. It works great to fill different tags. I think there is an issue when using some of the same tags in 2 different templates.
I started with one template for the standard location tags with GPS coordinates and another one for author, camera make and model.
In some cases the files already have GPS values and I don't want to change them. So I created another autofill template without the GPS fields called "Location no GPS". No the problems started.

When I start typing I see the values with indication of what template they belong to (Autofill Template 1). If I click on an entry from Location no GPS everything works normal. The tags are filed with the data. If I select an entry from the "Location with GPS" template the selection box shows up with the "Location no GPS" box active and no entry shown (Autofill Template 2). I can change the template in the box and then click ok to accept the first line. If there are multiple entries, I can neither click on an entry or use the up/down arrows to select the second or third value (Autofill Template 3).
This doesn't happen for all values, I tried to create 2 templates with less values to attach here, but I couldn't reproduce the issue with the slimmed down templates.
I will attached the autofill template and metapanel layouts in another post, so hopefully you can reproduce this.
While doing this, I noticed another potential bug. For many values, two lines contain duplicate entries after the tags were filled (Autofill Template 4). When the checkmark is clicked the duplicates most of the times disappear (Autofill Template 5). 
Almost the reverse effect I see when copying and pasting values in the meta data panel. At some point while assigning different templates to the same file, I created different values separated by semicolon. It looked like a value wasn't cleared when assigning the new tag data.
https://www.photools.com/community/index.php/topic,13797.msg97149.html#msg97149

Heiner

hluxem

Here are the autofill templates and metadata layouts.

Mario

The duplication is most likely caused while you include multiple linked tags in your AutoFill template. Remove the duplicate tags (City etc.) and now duplication will occur. See the details in your other bug report.

I will try to reproduce the AutoFill "empty"...? issue here. Not sure that I understand the bug report completely. I will post questions when I cannot reproduce it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I have identified and fixed 4 issues related to this.

1. The AutoFill dialog box did not respect the requested template if there are multiple templates, it always defaulted to the first template containing the tag. This is what you have reported.

2. If the user clicked on the AutoFill icon, the dialog opened and presented all AutoFill templates, even templates which don't contain the tag the user clicked.

3. The "clicking rows no longer works" problem.
This wasted hours of my time. Because, it's not a bug in IMatch, but in Windows (?).

For the table of AutoFill values in the dialog IMatch uses a standard Windows List Control element.
This list control by default allows only to click the first column in order to select an item. Unless the application sets a specific style flag, which then allows the user to click anywhere in a row to select it. This is what IMatch does.

As I found out, as soon as the list control is cleared and re-filled (when the user switches to another AutoFill template via the drop-down control at the top), the "click everywhere" no longer works. For some unknown reason.
I've tried to set the "allow to click anywhere" style again. No luck.
I've googled and tried out various things. No luck.
As soon as the list was re-filled, click anywhere was no longer working.

I finally worked around this by destroying the list and re-creating it every time the user switches to another AutoFill template. This makes the click anywhere work always. Seems like Microsoft has broken something, not sure.

4. The duplication issue
This happens, similar to your problem in the MD panel, because your AutoFill templates contain linked tags. The first linked tag applied updates all other linked tags, then the next linked tag is found which also updates all linked tags etc. This causes duplication of data.

To deal with this rather particular issue, AutoFill templates now check for this situation and process only the first linked tag in the AutoFill template. This sets all other linked tags but prevents duplication of data.

As I said in my comments on your MD Panel problem, don't use more than one linked tag when copying & pasting or in AutoFill templates. The tags will always show the same value anyways. For location, prefer the structured tags LocationCreated and LocationShown and use the Metadata Panel layout "6. IPTC Location" for full comfort and support for structured tags.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

Great, thanks for the excellent support!
And I will change my autofill templates!