I have a customer that has a qr barcode that contains a date, first name, last name, receipt number and receipt date last 4 digits of ssn number
Question
Question
Replies
Hi James,
We looked further at your session and the error you are receiving ("Index was outside the bounds of the array") is being returned because you do not have an input value for the "first name" pattern match. When you add in your barcode token the error should be resolved.
You may also notice that all of the patterns that are correctly returning results come sequentially before the "first name" pattern matching, and all that every pattern you are having issues with comes after the "first name" token. It is not that your patterns aren't correct, but rather that Quick Fields stops evaluating your pattern matching processes when it hits the error with the "first name" pattern matching. Adding in that token should fix your issues.
As a final note, while your patterns should all work with this small change, I would recommend simplifying your patterns as much as possible. Something along the lines of what Miruna suggested initially would greatly streamline your process.
You can run the barcode value through pattern matching to break it into a multi-value token for each line. Then you could use token indexing to put the right line into the appropriate field.
Something like ([^\n]+) would make a multi-value token (set Pattern Matching to find "all matches as a multi-value token).
Or you could use pattern matching to generate individual tokens for each line.
I had a VAR consultation on Monday with Kelsey and we were getting index was outside the bounds of the array. I was wondering if there was a solution for this.
It's not possible to tell from your screenshot how your patterns are configured and which one is throwing an error since you're not showing how your patterns are set up. But if i had to guess, if you have a pattern after the "Last Name" one, that's where the issue is.