Control over index of list of things from one data type to other

Hi,

Season greetings: tada: :tada:

I made an Inventory app for my business almost two years ago.

On the Invoicing part, I made one data type called “Invoice” where I stored all the data relating to the Invoice such as invoice Number, list of Items, Quantity, Unit, rate… And so on.

For the selection of items(Product), I made another Data type called “Material”. Every material have category, sub category … etc. and that ultimate material Item type is text.

Now, for better control over my Inventory I want to segregate the List of Items, Unit, Qty, Rate etc to an another database. To achieve that I made a recursive workflow. It tested and running Ok except the “List of Items”

List of Items are saving as per the ‘Material” Indent but all others are saving as per the sequence (What I want) of Invoice list of Items sequence. Las three days I stuck in this.

May be there is some way/trick involve which I am not able to figure out.

Please help and guide me the correct way to do this kind of WF.

Thank a lot in advance.