Community

Set page to annex upon database lookup fail

How do I write a script to set the page as annex if the database lookup does not return any result?

0

Comments

2 comments

  • Avatar
    Scott Chau

    This is going to be very complex.  Basically you can't get a DB lookup / rule to run until it matches a DocDef.  So first off, you're going to have to create a custom workflow.  In the workflow, there is going to have to run normal recognition.  Base on your logic, you should programmatically store Document Registration Value.  In the stage of your workflow, it would have to clear the classification result of the original recognition stage.  Then in Event Handler "Before Matching", you would set the following parameter based on the value in the Document Registration parameter you had in the previous step

    Matching.DefinitionsList = "";
    Matching.ForceMatch = true;

    By putting an empty value for the Doclist, it will force that page to be an annex.

    As you can see, this will involve a lot of scripting in the advanced workflow and event handler.  

    1
  • Avatar
    Adrian Enders

    This is good info that Scott gave. I would also ask, "Why would you want to"? There are already ways to deal with failed results of a database lookup. And if you set the first page to annex then FC will reset the doc def to "unknown" or "unprocessed", and export will error. That's even more work. 

    0

Please sign in to leave a comment.