Form Extractor with dynamic tables

Hey there, I have a basic document understanding sequence done up and am successfully extracting information from some of my documents (invoices). I am using a combination of the form extractor and the machine learning extractor. Using the Form Extractor to extract the item set in the invoice as a table.

I am encountering this problem in that if the table is of different size (different row count etc), the form extractor template will extract the subtotal and total price as one of the rows.

E.g. template is made for 2 rows of products, an invoice of the same company with a single row of products is sent through the document understanding process, and it reads the subtotal as the second row of items. I have made multiple templates, but nothing has worked.

How can I solve this? Should I make more types of invoices instead and classify them using the classifier instead of templates?

@Ryan_UI

You need to train with varied number of document lines for the model to be more robust so that it can extract information with changing number of lines also

Cheers