List of item shift to line item

Hi,
I am running an app since two years. for better control I want do some modification but facing some problem to transfer some data to an another data type. Its an inventory management app.
let me explain showing following example,

I have one Datatype called Material DB.

Category Material(Text)
Cat 1 Item 1
Cat 2 Item 2
Cat 1 Item 3
Cat 1 Item 4

Another Datatype called Invoice DB, which is linked with material DB,

Invoice No Materials (List of Text, link to Material DB) Quantity (List of numbers) Rate (List of numbers)
1 Item 2,Item 1,Item 3,Item 4 2,1,3,4 20,10,30,40

Now, I want to transfer above list of Item to a New data type called “Invoice line item”. For material I have linked “Material DB”. Transferring with recursive workflow I am getting the following result which is not correct.

Invoice No (Link to Invoice DB) Material (Link to Material DB) Quantity Rate
1 Item 1 2 20
1 Item 2 1 10
1 Item 3 3 30
1 Item 4 4 40

Material field index is not as per “list of Material” from Invoice DB index,
It should be as follows,

Invoice No (Link to Invoice DB) Material (Link to Material) Quantity Rate
1 Item 2 2 20
1 Item 1 1 10
1 Item 3 3 30
1 Item 4 4 40

I tried a lot but could not find the desired result. I tried with " Floppy Plugin" also.
Can anybody please give me a suggestion to resolve this issue. I am really stuck here.
I am regretting myself not to do this kind of data structure at the beginning of app building ( There are too many tutorial suggested that make a line item type for this kind of application)
I have posted this issue 16 days before also but not got any reply from anybody. (May be I could not explain correctly)

Please give me some guideline, I want to really overcome this issue.

Thanks in advance.

1 Like

Looks like a sorting issue, can you share screenshot of the WF that creates line items?

Also note that there has been some improvements to the Schedule API WF on a list lately (see : [Feature Enhancement] Schedule 100k Workflows with Schedule API Workflow on a List), thus recursive might not be the best way to accomplish what you’re tring to do.

If it’s a one time thing and your Bubble plans allow it you could also import your data to the new datatype.

@pierre6
Thank you for your valuable response.
Please have a look the WF,

I have not tried “API Workflow on a list” .Should I try for this as I have more than one list ( Refer to attached WF).

For now I have to transferred approx. 400 invoice and line item will be max 6000.
What will be your suggestion, go for “API Workflow on a list”?

Thanking you.