Forum Discussion

CharlotteMorin's avatar
CharlotteMorin
Qrew Cadet
17 days ago

Pipelines to upsert just one of duplicate records

I have an invoice line item table with a non-key field Invoice #.  Some lines have the same invoice number.  These lines with the same invoice number are usually entered by the user at the same time (because there's more than one line per invoice).

I want to use a pipeline to create an invoice header from the lines.  I have a table with a custom key that is that invoice #.  Of course it needs to be unique.  I know that if I use upsert I can insert new invoice headers and update existing ones.  

Right now I have my filter set to pull all invoice lines added in the last few minutes.  But some in that set will have duplicate invoice numbers, and the upsert does not allow this within the same commit - it errors out on the duplicate key.

Is there a way to commit one record at a time with upsert?  Or should I be doing this a different way?  

  • ya, ... Would be nice to have a Quickbase step which would absurt a single record. But since they don't give us that what you need to do is launch your pipeline to search all the records that may need Parents to be created and then INSIDE the For Each loop you need to create an upsert box, add a single row, and commit the upsert.

     

  • ya, ... Would be nice to have a Quickbase step which would absurt a single record. But since they don't give us that what you need to do is launch your pipeline to search all the records that may need Parents to be created and then INSIDE the For Each loop you need to create an upsert box, add a single row, and commit the upsert.

     

    • CharlotteMorin's avatar
      CharlotteMorin
      Qrew Cadet

      Thank you!  I just moved the commit inside the loop and it worked.