How to use custom table attributes - how to understand them

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Although I have read through the help function, I have a problem understanding how to use the custom tables.

I want to create a more complex rule with multiple conditions, but I'm not sure how to proceed so that the search for the conditions actually occurs in the same row.
Since the conditions are not unique in a more extensive table, the search may really only occur in one row.

Let's take the example from Hazel help:
A table with the columns: "Name," "ID Number," and "Favorite Color."

For the first condition, I use the table and assign the 1st column "Name" from the table to the first condition. For clarity, I name the custom table attribute created "Name".

So far so good, but how do I use the table for the 2nd condition (3rd, 4th. 5th condition etc.) or even later for the actions?
Do I proceed as described in "Reusing Custom Attributes in Condition Patterns"?

Do I use the Custom Table Attribute "Name" again for the 2nd condition and assign only another column under "Match using column"?

If yes, however, the rule becomes very confusing.

For example, if I have 4 conditions under "If all conditions are met", there are 4x "Name", although other columns (contents) are used in each case.
Also for the actions it becomes very unclear. If the file is to be renamed accordingly, it may look like this:

"Name"_"Name"_"Name"_"Name".EXT



If no, for the 2nd condition the same table is selected under "use a table from a file" but the custom table attribute is named e.g. like the columns "ID Number" and "Favorite Color".

This would make the rule much easier to read.
Also the action rename would be clear:

"Name"_"ID Number"_"Favorite Color"_"column_4".EXT

But does this ensure that only the same row is searched and found?


I am looking forward to your feedback.
speedy_99
 
Posts: 56
Joined: Thu Feb 12, 2015 11:00 pm

The table attribute should be named for the table or something more general, not the column you are using. But yes, you should be re-using the custom attribute.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks for the quick feedback.

I was afraid of this answer :wink: .

Do you have any advice on how to quickly see what conditions are working in the background when re-using the custom attribute? Without having to call "edit attributes".


Hazel is one of my favorite programs and your support is great.

thank you and keep up the good work.
Juergen
speedy_99
 
Posts: 56
Joined: Thu Feb 12, 2015 11:00 pm

I'll consider adding the column name to the attribute name though hopefully it doesn't confuse people. For example if you have "some table - some column", will people be able to intuit that "some table" in the attribute list is the same attribute and should be using that?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I think this is a good idea.

Example:
A table of employees with the columns "Name," "ID Number," and "Favorite Color":

Custom attribute "People" alone, is less transparent than

Custom attribute "People (Name)"
or Custom attribute "People (Col_1)".

Custom attribute "People (ID Number)"
or Custom attribute "People (Col_2)".

Custom attribute "People (Favorite Color)"
or Custom attribute "People (Col_3)".

Renaming the files would also be clearer this way.

rename:
"People (Name)"_"People (ID Number)"_"People (Favorite Color)".EXT

So at least for me more intuitive and a work relief.
speedy_99
 
Posts: 56
Joined: Thu Feb 12, 2015 11:00 pm


Return to Support