cancel
Showing results for 
Search instead for 
Did you mean: 

Forcing Document to go to Manual Review Advanced Capture

svillalon
Confirmed Champ
Confirmed Champ

How can I force a document to go to manual review if certain Keyword criteria are not met?

 

VB Scripting? 

If so, I didnt see any method from the documentation that does that. 

 

If there isn't a method to do that, how can I access the Document object from the keyword? (There are two types of subs KeyFieldMain and KeyField, dunno the difference). 

1 ACCEPTED ANSWER

Hi Seth,

 

In this scenario, where you want to implement custom keyword-analysis rules to determine if the document needs manual indexing or not (i.e. something more complex than just if required keyword(s) have value(s) or not, which you could do without scripting) you could do so using the form definition level VB script hook:

aac20e70fc254aa2abd455587231dbc1

 

This context runs after Advanced Capture is finished with the document, but before it is updated to the database.  It will run the 'FormAppliedMain' context (Sub) in the specified VB script, and from here you can access the standard Client API Document object to get the document information and keywords.  So something like this:

 

Sub FormAppliedMain

 

       Dim thisdoc

       Set thisdoc = OCRDoc.Document

 

       ' do whatever analysis you want on the Document object or its keywords, etc.

 

End Sub

 

However - the Document doesn't have a property that allows you to programmatically change the indexing status of the document (change it from indexed to unindexed or vice-versa) but what you can do is tell Advanced Capture that you want to change the document type.  So you may want to consider creating a new document type (or types) that has the same keyword types assigned to it (I assume you don't want to lose any extracted/pre-existing keyword values when this 'fault' condition occurs, you just want to be able to route these documents to manual index in lieu of bypassing it?) and then use the script to change the document type to this other type that means 'the same as before, but failed my custom requirement rules' which you can then use scan queue rules (a CPD decision queue that follows Advanced Capture, for example) that sends the document(s) of this/these new 'fault' document types to manual index.   So continuing from my example code above:

 

Sub FormAppliedMain

 

       Dim thisdoc

       Set thisdoc = OCRDoc.Document

 

       ' do whatever analysis you want on the Document object or its keywords, etc.

 

       If <document is OK> Then

 

                ' do nothing, the document will stay as-is and be archived/updated

 

       Else

 

                ' failed the requirements, so change the document type to type <B> that means something is wrong

               OCRDoc.DocumentTypeName = "name of my fault-occurred but same keywords DT"

               ' or could set by DocumentTypeID instead of name, if you so desire

 

      End If

 

End Sub

 

 

Then after AC runs, your next queue can sort out these doc type(s) that mean failed, and send them to manual index - or whatever you need to have happen.

View answer in original post

3 REPLIES 3

Hi Seth,

 

In this scenario, where you want to implement custom keyword-analysis rules to determine if the document needs manual indexing or not (i.e. something more complex than just if required keyword(s) have value(s) or not, which you could do without scripting) you could do so using the form definition level VB script hook:

aac20e70fc254aa2abd455587231dbc1

 

This context runs after Advanced Capture is finished with the document, but before it is updated to the database.  It will run the 'FormAppliedMain' context (Sub) in the specified VB script, and from here you can access the standard Client API Document object to get the document information and keywords.  So something like this:

 

Sub FormAppliedMain

 

       Dim thisdoc

       Set thisdoc = OCRDoc.Document

 

       ' do whatever analysis you want on the Document object or its keywords, etc.

 

End Sub

 

However - the Document doesn't have a property that allows you to programmatically change the indexing status of the document (change it from indexed to unindexed or vice-versa) but what you can do is tell Advanced Capture that you want to change the document type.  So you may want to consider creating a new document type (or types) that has the same keyword types assigned to it (I assume you don't want to lose any extracted/pre-existing keyword values when this 'fault' condition occurs, you just want to be able to route these documents to manual index in lieu of bypassing it?) and then use the script to change the document type to this other type that means 'the same as before, but failed my custom requirement rules' which you can then use scan queue rules (a CPD decision queue that follows Advanced Capture, for example) that sends the document(s) of this/these new 'fault' document types to manual index.   So continuing from my example code above:

 

Sub FormAppliedMain

 

       Dim thisdoc

       Set thisdoc = OCRDoc.Document

 

       ' do whatever analysis you want on the Document object or its keywords, etc.

 

       If <document is OK> Then

 

                ' do nothing, the document will stay as-is and be archived/updated

 

       Else

 

                ' failed the requirements, so change the document type to type <B> that means something is wrong

               OCRDoc.DocumentTypeName = "name of my fault-occurred but same keywords DT"

               ' or could set by DocumentTypeID instead of name, if you so desire

 

      End If

 

End Sub

 

 

Then after AC runs, your next queue can sort out these doc type(s) that mean failed, and send them to manual index - or whatever you need to have happen.

svillalon
Confirmed Champ
Confirmed Champ

Hi Steve,

 

This is a great idea! I was thinking of another work around but will definitely consider this.

 

Thanks for always answering our Advanced Capture questions. I posted another question a week ago about AC’s point and shoot not working in Unity Client. (Not point and click). Not sure if you know how we could make it work.

Hi Seth,

 

I'm glad my suggestion (or your other idea(s)) have got you pointed in the right direction.  Regarding your other question about using Point and Shoot in the Unity client, I'm afraid I don't have any immediate thoughts to offer you; I think Justin's advice to open a support request and dig deeper into it through that process is the way to go - your rep can collect and analyze your implementation-specific data and configuration settings in a way that is difficult to do on this forum.   But once you get over that hurdle and if you still have questions about the scripting context for Point and Shoot in the Unity API, please post a question on here and I will keep an eye out to see if I can help with that.