Custom Date problem

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

Moderator: Mr_Noodle

Custom Date problem Sat Jan 07, 2017 10:48 am • by alpatti
I am trying to get a date from a bank statement. What I see on the statement is "to May 21, 2016" and I can create a custom date to match. However, the spacing on the next scanned document may be "toMay21, 2016". Can the spaces be wild carded or is there another solution for getting the date with 1 rule?
alpatti
 
Posts: 12
Joined: Fri Jan 06, 2017 9:00 am

Re: Custom Date problem Sun Jan 08, 2017 1:41 am • by alpatti
I stumbled upon nested conditions which I sort of got to work. My nested custom dates were

If any
Contents | contain match | Cdate where Cdate is a custom date
Contents | contain match | Cdate1 where Cdate1 is a variation of custom date
Contents | contain match | Cdate2 where Cdate2 is a variation of custom date
Contents | contain match | Cdate3 where Cdate3 is a variation of custom date

In my test example, Cdate3 matched and the entire rule was met.

With a matched rule I would like to move and rename the file. The move is okay, but now I have a renaming problem.

Rename with pattern Cdate ........pdf

Since Cdate did not match, the date portion of the rename is blank. What now?
alpatti
 
Posts: 12
Joined: Fri Jan 06, 2017 9:00 am

Re: Custom Date problem Mon Jan 09, 2017 12:21 pm • by Mr_Noodle
Instead of having separate custom date attributes, you can re-use the same one in each condition, varying the pattern for each. The first one to match is the one that gets used.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Custom Date problem Mon Jan 09, 2017 4:06 pm • by alpatti
When I tried to create another custom date (my name Cdate), Hazel automatically saved it as Cdate 4 (since the Cdate name had already been used?). How can I rename a variable name?
alpatti
 
Posts: 12
Joined: Fri Jan 06, 2017 9:00 am

Re: Custom Date problem Tue Jan 10, 2017 11:48 am • by Mr_Noodle
Don't create a new attribute. If you look in the list of attributes you can drag in, you'll see your previous attribute there. Drag that one in and edit it.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Custom Date problem Wed Jan 11, 2017 11:04 am • by alpatti
Thanks, that helps.
alpatti
 
Posts: 12
Joined: Fri Jan 06, 2017 9:00 am


Return to Support