Error If: Index was outside the bounds of the array

Hi, I have this error when testing the job, but strangely it was running w/o any issue previously. Pls assit as I ahve spent whole trying to figure out the issue. This is a Test version. Appreciate some kind soul could help.
Pls find attached xaml file and test invoices.

Processing Multiple Documents Of Different (1.2 MB)

You get the error because the value was not extracted, thus leading to item.Values being empty.


Depending on how you want to handle missing values, change the If condition to:

item.IsMissing = false AndAlso item.Values(0).Confidence<0.96

This will check that there’s a value first before checking the confidence score.

If you want human validation for missing values also, the condition should be:

item.IsMissing OrElse item.Values(0).Confidence<0.96


Thanks for the advice. I will check it out and test again.