You are viewing limited content. For full access, please sign in.

Question

Question

Finding the Highest $ Amount Value in a document

asked on October 5, 2016

Hi,

 

Was wondering if I am able to get some assistance in using Regular Expressions. I need to find the largest amount figure in an invoice using Workflow and Token 

 

Using \d+[.][\d][\d] gives me the first match on the page which is not usually the total. Some of the process is below, I have also used the Track Tokens to see if all data is being picked up,

 

I have 7 tokens that are being read correctly as it is only finding specifics Document Name etc. But, would love to have some assistance regarding Totals? 

Thank you in advance, 

 

Regards

Ziad Khamo 

0 0

Answer

SELECTED ANSWER
replied on October 5, 2016

Hi Ziad, 

Here's the strategy I would use:

  1. Create a multi-value token with all the amounts on the page. You can do this by using your existing pattern and choosing the "All matches (as a multi-value token)" option. 
     
  2. Create a new token called something like MaxValue, whose value is created by using the token editor "Max" function on the token from step 1. Be sure to check the box for 'number' in the 'token tags' section so that Workflow can apply the correct 'Max' function for this type of data. 

 

Step 2 will look something like this:

2 0

Replies

replied on October 5, 2016

Hi Tessa,

 

Thank you so much, that just resolved the issue I was encountering, making it so much easier to find the max value = the total value of the invoice.

 

Query, are there other commands similar to the '#@Max@#' we can use to pick up other totals? things such as sub totals? GST? etc? 

 

Thanks again for your assistance in this, 

 

Regards

Ziad

0 0
replied on October 6, 2016

Yes, Max is just one of the token functions available through the Token Editor dialog.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.