Nested If Produces 2 Date Match Tokens

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

Moderator: Mr_Noodle

Nested If Produces 2 Date Match Tokens Fri Feb 17, 2017 7:44 pm • by bmhardy
I have a bill for which I use Date Match to Rename the file. The bill scans differently from one scan to the other. I am attempting to use a "nested if" to capture the date match. So, if any of the conditions ("- 'DateMatch'" or "-'DateMatch'") occur, I will get a successful match. (Note that the difference is the presence or absence of a space after the "-"). That part works great. The problem comes when I want to use the DateMatch token in renaming the file. I tried to name the tokens the same thing, but Hazel appends a "1" on the first one and a "2" on the second one. I wanted to name it the same so that I could use the token in the rename. When I attempt to use the token, the rename action gets filled in with "hazelcustomtoken<DateMatch token>" and at the bottom, the token name is presented as "<DateMatch token name> 1 <DateMatch token name> 2".

I hope you can follow that.

In any case, a successful preview of the rule against the file shows me that it works, but the file doesn't get renamed or moved.

Can you help me out here.
bmhardy
 
Posts: 7
Joined: Fri Feb 17, 2017 7:30 pm

Re: Nested If Produces 2 Date Match Tokens Mon Feb 20, 2017 11:42 am • by Mr_Noodle
If you want to re-use a date attribute, then drag it into the pattern. Don't try and name it using an existing name.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support