Need help with filter for data driven category

Started by hluxem, August 12, 2022, 06:57:35 PM

Previous topic - Next topic

hluxem

I'm trying to set up a data driven category and using a category filter. Seems to be easy, but for whatever reason I can't get it working.

In the data driven properties dialog it says you can use one or more regular category expressions.
Reading the help for @category formulas it seems like the following example should give me all files in the database without the files in the category Beach.

"@All" NOT "Beach"

That works for a category with a formula in properties.

When I copy the same statement in the category filter for the data driven category I will end up with 0 files in the category. I tried to just use the category "Beach", that will also show 0 files. I then tried to enter Beach without the ". That will give me all files from the category Beach and from category which have Beach in their name. So it seems like the syntax is wrong.

Obviously, I'm missing something here. Can anybody give me a pointer on how to limit the scope of a data driven category to include all files unless they are in a certain category?

Thanks alot,

Heiner


Mario

The filter takes category names (in form of a regular expression), it does not parse category formulas.
You setup a category with the formula you need (or assign files to it or whatever) and then use the name of that category in the data-driven category as a filter.
To specify the category, you can use the same syntax as for the @Category formula: @Category[]

In your example, create a category named AllButNoBeaches with the formula "@All" NOT "Beach" and then use AllButNoBeaches as the filter.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Mario I hope your post helps Heiner solve his problem, it's certainly simplified some of my data-driven category formulas.

My data-driven categories had all worked with long formulas before but many of them relied upon this category filter

@All|^Workflow$|^LISTS$|^Years$

After what you posted it occurred to me that I might be able to simplify that category formula reference by simply using

Years$

And it works!

I know it works for me because it's the only category I have that ends in the word

Years

Thank you.

Mario

Very good. Finding a more elegant solution is always nice.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

Thanks Mario and John!

I got confused with category regular expression and category formula.

Heiner