Formula editor : missing quotes

Started by Oriel, April 09, 2020, 11:13:04 PM

Previous topic - Next topic

Oriel

I'm trying to select a category (i.e. my parents) within a folder (i.e.year 2005 including all 12 monthly sub-directories). I created a temporary category and used the formula editor to build a query, as this :

       "@RFolder[file://H:/3_Photos/2005/]" AND "@Category[@All"Personnes|Famille|Ascendants|Grandclément-Michel & Simone"]"

Testing returns an error message :
                                        Error code [15003]
                                          'Missing quote ".'

To my eyes, the number of quotation marks in the formula being even, I don't grasp it!

Do you see better?

Thanks

Mario

Check Grandclément-Michel & Simone"]" which seems to have an extra " before the ] ?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

To me it looks more that a | is missing after the @All part?
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

Right. This looks like the OP added a new category inside an existing formula, but at the wrong spot.

"@RFolder[file://H:/3_Photos/2005/]" AND "@Category[Personnes|Famille|Ascendants|Grandclément-Michel & Simone]"

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

Oriel

Mario,
Your formula is Ok but the result is not what I expected.
I checked it by other means: the correct answer is 1 single file where the query returned 280 files. Fearing a problem with my category organization, I tried selecting different levels of the hierarchy, in this order:
The original query: "@RFolder[file://H:/3_Photos/2005/]" AND "@Category[Personnes|Famille|Ascendants|Grandclément-Michel & Simone]"
then:
"@RFolder[file://H:/3_Photos/2005/]" AND "@Category[Personnes|Famille|Ascendants]"
"@RFolder[file://H:/3_Photos/2005/]" AND "@Category[Personnes|Famille]"
"@RFolder[file://H:/3_Photos/2005/]" AND "@Category[Personnes]"
All return the same 280 files, meaning the formula only analyzes the first level of the category. So I tried and checked the syntax of the query.

After some trial, the correct query is
"@RFolder[file://H:/3_Photos/2005/]" AND "@Category[@All|Personnes|Famille|Ascendants|Grandclément-Michel & Simone]"
The glitch is the "|" following "@All", that look a bit like 3 "l" signs.

By the way is there a way to save a query inside Imatch, or have I just to copy/paste the formula in some external note?

Thank you for your help.

sinus

Quote from: Oriel on April 10, 2020, 02:18:27 PM

The glitch is the "|" following "@All", that look a bit like 3 "l" signs.


Also Thorsten was on the correct line.
Best wishes from Switzerland! :-)
Markus

Mario

IMatch does not insert @All when you select a category in the formula editor. Unless I remember wrong.
So where dos this come from? The @All| is not needed, it is implicit.


QuoteBy the way is there a way to save a query inside Imatch, or have I just to copy/paste the formula in some external note?

Did you consider the IMatch Notepad ?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Oriel

Quote from: Mario on April 10, 2020, 02:40:18 PM
...
So where dos this come from? The @All| is not needed, it is implicit.
...

The @All comes for the Help system at the chapter "Category Formulas" where it says "When IMatch sees an expression starting with @All, it considers every level of the path (separated by|) individually. You can use regular expressions on every level (which is why we find both "Beach Club" and "Beach", but the levels also restrict where IMatch is looking for matches.
Expressions starting with @All are preferred because they are much faster to evaluate."

I did not, and still don't, quite unterstand this but fiddled with it and it works Ok.
If the operator @All is omited, the query doesn't return the right answer (returns 280 files instead of a single one).

Thanks for the Notepad, I didn't find it yet!

mfG

Mario

QuoteThanks for the Notepad, I didn't find it yet!

What does this mean? You did not know about it or you don't find the App? This is for IMatch 2020, btw.

I just wondered about @All because when you insert a category via the formula editor, it is never added.
But of course you can add it yourself when you need the functionality provided by it (see help).

Just make sure you don't duplicate the "
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Oriel

Re Notepad
It only means, I looked into most important functions first. The Notepad looks intersting indeed.
Bye