[square brackets] in keywords

Started by grafton84, July 03, 2020, 02:32:10 PM

Previous topic - Next topic

grafton84

I have a number of special purpose keywords enclosed in [square brackets]. These read and write with no difficulty in iMatch and Lightroom. However, they don't work in category formulas. I get a 15010 error code (Category not found). I tried escaping the brackets like /[keyword/], but that didn't work either. Short of changing all of these, any suggestions?

Rob...

Mario

Remember to enclose category names in " => "[My Category]"
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

grafton84

Quote from: Mario on July 03, 2020, 02:51:31 PM
Remember to enclose category names in " => "[My Category]"

I did that. The following examples fail:

"@Keywords|Years|[unknown]"
"[unknown]"


Rob...

JohnZeman

It seems to work ok here with the following test example.

"@Folder[file://D:/Mine/Photos/Years/2020-2029/2020/]" AND "Workflow|[My temp Category]"

grafton84

Thanks @JohnZeman! Hmm, I wonder what's different in my setup.

Rob...

Mario

Give us the exact category name and your exact formula.

Note: Using [ ] in your keywords (or any other 'special' characters) may cause trouble downstream, when exchanging data with other applications.
Because some applications use [] to indicate group keywords or associate other meanings with [] or {} or ().
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

grafton84

Quote from: Mario on July 03, 2020, 05:44:11 PM
Give us the exact category name and your exact formula.

It was in my earlier post. Here's the exact formula (though I tried many different variations, all failed).

"@Keywords|Activity|Railfan" AND "@Keywords|Years|[unknown]"

Also attached screenshot of the keyword in the list.

Rob...

Mario

#7
Category formulas use [] for specific purposes, for indexing and more. For example: @Category[Index] or @FileRegExp[[a-z]*] and similar formulas.
Your keywords with [] breaks that logic. As I said, using [] or () or any other 'special' characters in your keywords may be a bad idea.
I may look into for a future version. Not sure, though. You are the first ever user running into this, so it seems that this is a not a problem for most. And it could complicate things alot for the IMatch formula parser.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

grafton84

OK, thanks. I'll try some other workarounds. It is curious that it works for others, though.

Rob...

Mario

Quote from: grafton84 on July 03, 2020, 07:42:37 PM
It is curious that it works for others, though.
Rob...

Not really. It's wise to use only standard characters (if possible, from the ASCII set) in keywords. KISS.
Using special characters, symbols etc. in keywords is often a real nuisance when you have to exchange your data with other software, services or you work with clients or on multiple platforms (Windows, Mac, Linux).

For example, using common characters like ÄÖÜ, Á, á can break keyword interoperability, especially if you have to support legacy IPTC in typical image agency, web service or institutional contexts. Using () or {} or [] in keywords is begging for problems when it comes to exchanging data between applications.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook