New Balance from Credit Card Statement

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

Moderator: Mr_Noodle

New Balance from Credit Card Statement Sat Jun 23, 2018 10:58 am • by SpinalTap
Hello,

I have created a rule that renames my credit card statement, moves it to a folder and also runs an AppleScript that creates a calendar entry in Fantastical based on the Due Date from the statement.

For this calendar entry, I also was wanting to include the amount due. On my credit card statement, it shows the following:

New Balance <spaces> $1234.56

Is there a way to grab the dollar amount ($1234.56, in this example) and store it so it can be passed to my AppeScript? The obvious problem is that this amount, and hence the number of characters, can change every month.

Thanks in advance for your help.
SpinalTap
 
Posts: 42
Joined: Tue Apr 11, 2017 7:12 pm

Re: New Balance from Credit Card Statement Mon Jun 25, 2018 10:45 am • by Mr_Noodle
You can use a custom attribute/match pattern to match that. You can specify a pattern like $(number).(digit)(digit)
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: New Balance from Credit Card Statement Mon Jul 02, 2018 12:27 pm • by SpinalTap
Mr_Noodle wrote:You can use a custom attribute/match pattern to match that. You can specify a pattern like $(number).(digit)(digit)


Thanks Mr. Noodle. I just realized that a number like the one in my example would have a comma, so it would be displayed as $1,234.56. Any thoughts on how I can do that? I think I would have to build 2 scenarios somehow - one when the number is $999.00 or less and one that is $1,000.00 or more.

Thanks.
SpinalTap
 
Posts: 42
Joined: Tue Apr 11, 2017 7:12 pm

Re: New Balance from Credit Card Statement Tue Jul 03, 2018 10:39 am • by Mr_Noodle
Yes, you would have to have two conditions to match those different scenarios. Alternatively, you can use "anything" to match everything between the $ and .
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron