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

Question

Question

Token Formatting with Characters and Numbers

asked on February 16, 2018 Show version history

I have a Vendor Number that usually is a 4 digit number, but it sometimes is 3 digit or 5 digit.  I'm looking to put leading Zeroes in front of the value.  That part is easy, using 00000 as the format.

 

The wrench to throw in here, is sometimes there is a letter character at the start.  It is always at the start of the string.  For example, it could be: A123 or C4321.

 

Is there a way to use the formatting to preserve the character, while adding the leading zeroes (if they are needed)?

 

Thanks

0 0

Replies

replied on February 16, 2018

I would split them out and combine later. I will assume you have pattern matching.

With the ZonalOCR as your input, make two pattern match tokens, one with (\w?)\d{3,5} and other with \w?(\d{3,5}) as it will then split out just the items in parentheses. Run your number formatting on the digit part, then in metadata include the pattern matched letter next to your formatted digits. If there is nothing in the Letter token, it should not kick back an error unless you tell it to.

This is untested but I think it should do the job.

 

1 0
replied on February 16, 2018

Who will fill the vendor number? an end user or it will be grab from the document?

if it is taken from a document you can maybe do it in several step by using token Creator.

 

0 0
replied on February 16, 2018

I'm getting this token value in Quickfields, reading the account number of a 1099-MISC tax form.  They are all, older, already existing forms.

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

Sign in to reply to this post.