Grooper 21.00.0082 is available as of 12-12-2023! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 23.1.0016 is available as of 03-15-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 23.00.0042 is available as of 03-22-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Next Step Syntax for Items in Batch
henryma
Posts: 63 ✭
After extract step; I want to check key fields if three of the fields are blank; I want to run recognize with a different OCR engine then extract only those PDF. I have a batch with 20 PDFS, I was wondering what syntax to use to capture the field value at the PDF level. Will it loop through all PDFS and only submit to the next step?
I was trying to use DirectCast(Item,BatchFolder).IndexData.Fields("InvoiceAmount").Value = " " and DirectCast(Item,BatchFolder).IndexData.Fields("InvoiceDate").Value = " " and DirectCast(Item,BatchFolder).IndexData.Fields("InvoiceNumber").Value = " " in and IF logic but Item is not allow in next step expression.
I was trying to use DirectCast(Item,BatchFolder).IndexData.Fields("InvoiceAmount").Value = " " and DirectCast(Item,BatchFolder).IndexData.Fields("InvoiceDate").Value = " " and DirectCast(Item,BatchFolder).IndexData.Fields("InvoiceNumber").Value = " " in and IF logic but Item is not allow in next step expression.
0
Best Answers
-
GrooperGuru Posts: 481 adminSo one thing to understand about a Next Step Expression is that the batch still has to stay together at all times, unless you choose to use the Spawn activity at some point to move a subset of documents into a different batch. So if your goal is to conditionally do something with some documents in a batch, but not others, a Next Step Expression won't get you there. Instead, you could have an additional pair of Recognize and Extract steps after the original ones. Each of the new ones will have a Should Submit Expression to only run those activities if the individual document meets your criteria.Matt Harrison
Product Manager
mharrison@bisok.com5 -
GrooperGuru Posts: 481 adminI've never tried it, but you may be able to use a different syntax. So in your case, since you're scoping the activity to the page level, the Item is actually the Batch Page, not a Batch Folder. So you need to go from the Batch Page, up one level to the Parent Folder, then check the index data from there. So something like this...
DirectCast(Item.ParentNode,BatchFolder).IndexData.Fields("InvoiceAmount").Value = " " Or DirectCast(Item.ParentNode,BatchFolder).IndexData.Fields("InvoiceNumber").Value = " "
Matt Harrison
Product Manager
mharrison@bisok.com5
Answers
I am trying to use BatchFolder; but because of the scope of page is not processing based on my expression.