How to get specific value from Data Extraction Scope(Document Understanding) output?

Hello,
I am using Document understanding for extracting invoice details. I need to write invoice information in the item table. (Eg: Invoice number, Date needs to write in the item-level table) But unable to get those invoice level information particularly.

@Lahiru.Fernando. kindly help me to sort this out.

Thank U

2 Likes

Hello @Kalees9486

In the Document Understanding framework, once you complete the data extraction scope, the output you get is a variable of type “ExtractionResult”.

For you to get the data you extracted, you have to use the activity called “Export Extraction Results”. This will take the ExtractionResult variable as input and give you a DataSet variable as the output.

This DataSet variable contain multiple DataTables and these datatables do contain the data you extracted from the invoice.

Hence the DataSet contain multiple data tables, you have to next use the For Each activity, and configure the argument of that to DataTable.

Within the For Each activity, use any type of activity that you need to get the data from each data table. For example, if you wish to write the data into a excel sheet, you can simply use write range inside the For Each :slight_smile:

Hope this helps…

4 Likes

@Lahiru.Fernando,
I tried the export extraction activity method. But now, Unable to retrieve a specific value from the dataset/extraction result variable.

Thank U

@Kalees9486 - Could you please take a look at the DU I have created…

Invoice Data Extraction_Taxonomy.zip (201.9 KB)

2 Likes

@Kalees9486 - I have worked on another DU where i have used Intelligent Form Extractor as shown below…You can extract any fields from it after defining that field in the taxonomy manager…

I have used Google Cloud Vision OCR on this, because that was extracting most of fields perfectly in this form.

2 Likes

Hi @prasath17,

I tried to extract data From Scanned PDF. As it is a scanned document, it’s template data-position may change like Structural Difference ( Shrink, Enlarge).

  • How to solve this issue?

Thanks and Regards

Thanks for your reply @prasath17 .

I am able to extract all fields through extractors. But my need is, to pick specific value from extracted result variable.

Thank U

if this is a form, please try the form extractor - it should take care of skew angles and size (like shrink / enlarge). It cannot deal with warping (curvy lines) - so if the page has a constant skew angle, all good. if it varies throughout the page, not good…

so do try the form extractor to see if it works…

3 Likes

@Kalees9486 - I hope you are writing your output to excel right? From there, you can use Read range to Datatable and from the datatable, you can read the specific column you want…

1 Like

ok @prasath17.

Is there a way to get the particular data without writing it into an excel file?

@Kalees9486 - Yes , JSON. You try deserialize JSON and then from that step get the specific data you are looking for.

But i am still not able to get your objective here …what is your requirement? Can you pls brief

@prasath17
My objective is, I want to extract data from an invoice file (Invoice information like Invoice Number, PO number, date, total, etc., and with line items. Now I have to write the invoice number and PO number information in the line item sheet. It’s just for better identification like these items from this particular invoice. It is a reference key for a particular invoice(Primary Key).

@Kalees9486 - You can easily do it after writing the output to excel. You can read that particular row and write to a text file.

or if you want to copy to other sheet, follow the same process mentioned below and you can write it…

Please refer this post…

1 Like

Yeah. I know, its possible to get a specific value after writing into an excel. By any chance or is there a way to write this information at the time of writing into an excel file?

@Kalees9486 - Yes i have tried like below and i was able to extract it…

Say this is my excel output

I have tried the write line before writing to excel…

autoDataSet.Tables.Item(“Simple Fields”).Rows(0).Item(“Company Name”).ToString

YourExtractedDataset.Tables.Item(“Simple Fields”).Rows(0).Item(“Column Name”).To String

Output - “Compu Roots”
image .

Hope this is what you are looking for…

3 Likes

@prasath17

Yes exactly, This is what i need. Will check…

Thank U

The columns in my


table row fields is inserted to one colums

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.