I’m trying to classify multiple documents based on it’s name. For example, I have in a folder 2 pdfs, one named ‘Invoice_2571’ and one named ‘Ticket_2571’.
I want to somehow manually assign the ‘ClassificationResult’ output variabile of ‘Classify Document Scope’ based on the name of pdfs and use it further in the extraction scope.
I need to do this, because on this process I can encounter invoices that looks exactly the same but need to extract different data from them (basically load a different document type taxonomy). Hope that makes sense…
Anyone know a solution for this?
This is a good solution, but if we have multiple(5+) document types I think the code will be hard to read with that many if conditions in it.
I also found a method to manually assign the document type just between the ‘Data Extraction Scope’ and ‘Classify Document Scope’ with this line:
Where classifResult is the ClassifactionResults array output of ‘Classify Document Scope’ and we use that Split, because the DocumentTypeId is defined as ‘[Group].[Category].[DocumentType]’
you have a mapping data table with two columns first column “filename” starting keyword(Example: Invoice), second column “documentname”, based on the file name find out what is document name using linq query dynamically and replace the name in the below query to get document type id.