cancel
Showing results for 
Search instead for 
Did you mean: 

Ideas for extracting complex table

elopez
Level 2
I need help from someone with experience with Decipher. I have to extract a complex table of product code, description, quantity, unit of measure, $ / Liter, delivery number, delivery date

Example:
9424.png

My problem is the delivery numbers. For each product there are N number of delivery numbers and they can have 5 pages only of lines of delivery numbers for a single product.

The first thing I thought of is to make a table with
Code Product, Desc, Qty, Delivery 1, Date delivery 1, Delivery 2, Date Delivery 2, ..., Delivery N, Date Delivery N

But since the amount of delivery number is dynamic, not really how many extra fields I can have.

PDFs can contain more than 6 pages of the same invoice in a single file

How would you think of this?


------------------------------
Elbio Lopez
Senior Analyst
Enta Consulting
America/Argentina/Buenos_Aires
------------------------------
3 REPLIES 3

rizistt
Level 3
HI Elbio Lopez,

That's a fairly complex scenario. I was recently working with the same kind of quotes where the items were dynamic.

In your case, two tables are merged (essentially, but those are related). My approach would be to have two tables in the DFD. The first table would have only the Product Code, Description, Qty. (Amount), Unit, $ / Liter. And the second table would have the Delivery Number, Qty., and the Delivery Date.

Question - How would you cross-match the data?
Well, that is easy, now that you're extracting the Qty in the second table as well, you can iterate over both tables to cross-match the sum of the qty. Here's an example,

Let's consider Index_X = 0 for the first table, that gives us qty = 7.000
Let's consider Index_Y = 0 for the second table, that gives us qty = 7.000

As both of these quantities are the same, we can increment both Index_X and Index_Y by 1.
Now Index_X = 1 gives us qty = 116.999
Index_Y gives us qty = 29.000
Let's increment Index_Y and sum the quantities. We will increment Index_Y till the desired sum is reached which is 116.999.

The next iteration should have Index_X = 2 and Index_Y = 5 and so on.
Let me know if that helps.



------------------------------
Rizwan Tayyab
------------------------------

Rizwan, thanks for the reply.

I will try the approaches you mention. I just wanted to build 2 tables but I wanted to include the product code in the 2 tables but decipher did not allow it since the region was used for the first table. But with your idea of adding the quantities you can also relate the products to their deliveries.

------------------------------
Elbio Lopez
Senior Analyst
Enta Consulting
America/Argentina/Buenos_Aires
------------------------------

Great, please let me know how it goes.

------------------------------
Rizwan Tayyab
------------------------------