Page 1 of 1

Extract an amount

PostPosted: Thu Oct 14, 2021 7:26 am
by IanF
Hi,

I am struggling with how to extract an amount from a statement. The issue is the amount is written in a format that changes slightly depending upon whether it is under 1,000 or over. So the format is xxx.xx USD or x,xxx.xx USD, or xx,xxx.xx USD etc. If I create a custom text, naming it "Amount" 123,123.123 USD for Contents contain match this works, and I can use this to name the document, but this fails when the amount is under 1,000 USD, as there is no comma in the amount.

Is there a better way, or do I have to create duplicate rules for < 1,000, then up to 99,999 etc?

Thanks

Re: Extract an amount

PostPosted: Thu Oct 14, 2021 10:06 am
by Mr_Noodle
You can use nested conditions set to match if "any" match to keep them all under one rule. Still not ideal but at the moment there's no detection of numbers with thousands separators.

Re: Extract an amount

PostPosted: Sat Oct 16, 2021 9:30 am
by SpinalTap
IanF wrote:Hi,

I am struggling with how to extract an amount from a statement. The issue is the amount is written in a format that changes slightly depending upon whether it is under 1,000 or over. So the format is xxx.xx USD or x,xxx.xx USD, or xx,xxx.xx USD etc. If I create a custom text, naming it "Amount" 123,123.123 USD for Contents contain match this works, and I can use this to name the document, but this fails when the amount is under 1,000 USD, as there is no comma in the amount.

Is there a better way, or do I have to create duplicate rules for < 1,000, then up to 99,999 etc?

Thanks


I've had luck using a wildcard (%... . 11) and then testing the Match from beginning setting. So for example, on one of my MasterCard statements I specify the wildcard match as the 4th occurrence from the beginning and it works to extract the Amount Due for that statement.

I use this data and Fantastical to create a calendar reminder with the date and amount due.