Metadata Mechanic Question

Started by JohnZeman, January 08, 2024, 12:42:00 AM

Previous topic - Next topic

JohnZeman

During a text replace operation with the Metadata Mechanic can the mechanic replace the word

and

with

&

?  So far when I have tried to replace and with & in a text field the mechanic just removes everything from the word and to the end of the text.

Mario

My first guess is that & is a special character for HTML and thus IMatch apps and IMatch Anywhere Web Services. it must be handled in a special way when sending requests to IMWS. I'll have a look.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rienvanham

In many "languages" (e.g. XML) it is "&" for the "&" character.

Mario

Not in this case.
& is used to separate parameters in an URL like v1/files?id=123&a=b&c=d&filter=\reg

The problem was that the specific combination of parameters John's MD Mechanic options created a query URL like this:
http://127.0.0.1:50519/v1/files?idlist=%40imatch.filewindow.active.selection&fields=id&tagtarget=XMP%3A%3Adc%5Ctitle%5CTitle%5C0&varreplace=and&varreplaceWith=%26&escapevariables=false&auth_token=06adccc245ec66b6ea034655cf77c5cef44cb11c766e62b6957859aaa08a537a
and the duplicated && resulting from the %26& was not handled correctly when IMWS was parsing the parameters.

Fixed for the next release.
As a work-around, use a Metadata Template for now.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook