Copy a List of Things - Similar Data Type

Hello Bubble Comunity, I am a new Bubbler; if you can guide me, it would be helpful since I am stuck for several days at this point. I am creating a web development, and a piece of this is about approving quotes and invoices. When a “Quote” is approved, you can convert the “Quote” into an invoice, so I need to copy the line items from the approved “Quote” to the Invoice.

I think “I have to copy a list of things” from LINE ITEMS COTIZA to LINE ITEMS; these two data types are similar, I need to copy some line Items from the Quote to the Invoice.

  • All Line Items (invoices)
  • All Line Item Cotizas (quotes)

When I have the Workflow “copy a list of things,” it copies the line items I want, but it does in the All Line Items Cotiza (quotes) in the wrong place (yellow highlighted lines).

How can I copy them to the data type>Line Item (invoices) instead?

Work Flow:

Copy a List of Things

All Line Item Cotizas (data type/app data):

All Line Item Cotizas

All Line Items (data type/app data): I need to copy the highlighted yellow lines in here; I am going to assign an Associated Invoice, the info
Name= Name Cotiza
Notes=Notes Cotiza
Sub Total= Subtotal Cotiza
I share All Line Items where it should copy the list.

All Line Items

Thank you!

Hi Daniel
I’m not completely sure I understand but here’s my take on it:
A quote is a data type
Quote includes a field line items, which is a list (quote line items are a separate data type)
Quote line item data type includes, name, descriptions, amount (and quantity) fields
Quote also has a field for the invoice (when it is created)

Invoice is a different data type
Invoice line item is a different data type
Invoice has a field for quote
Invoice has a list field for invoice list items

To create the invoice from the Quote you need to copy each Quote line item (field by field) to a new invoice line item. An API backend workflow is the way to do this. Here’s how to do this: API Tutorial: Schedule a Workflow on a List - YouTube

Then you need to add each Invoice list item to the list field in the invoice data type. If the order matters pay attention to sorting when you specify the list to run the backend workflow on (eg if you had an Item# field in the list item you could sort on that).

Hope that helps!

1 Like

Hello @shane.holohan1, thank you for your reply I will test the API backend workflow and see if it works. I thought this could be solvel without it or just Copy a List of Things and Make Changes to a List of Things.

I remember being at a similar stage in my journey - backend workflows just sounded complicated but they really simplify situations where you want to create a list of new data types from an existing list of another data type.

Dear Gaby @romanmg, I saw your reply in this post long time ago How to move all data from “type” to “type”?, in 2017, I think my case is similar, and I would like to know if it’s possible to have your suggestion in my case. Thank you

Hello @shane.holohan1, I tried this option over the weekend, and you were right; it worked. Thank you again for taking the time to reply about this topic.

No problem Daniel. Glad it worked for you.