MichaelFrishman
8 years agoQrew Cadet
Automated copy of one instance of field value to new table
Every night I have an external API that copies new records into a "Purchase Order Lines" table. This table has a key field of a PO#-Line#, in the format "123456-001", where the 123456 is the purchase order number and the 001 is the line number. There are multiple records for each purchase order because there are multiple purchase order lines. So the next record would be "123456-002" and so on. The PO#-Line# combo is unique and the key field for that table. However, the PO# by itself is not unique.
I need to have *just* the PO# copied to a new table as the key field. I have tried creating a QB Action to copy PO# to the new table (Purchase Orders) whenever a new record is added to Purchase Order Lines table, but it tries to copy each new record, and I get webhook error because my import data has duplicate values for unique fields. It won?t even copy one instance.
Since the Purchase Order Lines table is also a details table, I've also tried a maximum value summary field to the master table, which would then push back the value to the details table. However, the QB Action triggered on the addition of a new record in the Purchase Order Lines table takes place before the data is pushed to the master table then back to the details table. So that does not work either.
Does anyone have a better solution that I could try? As a workaround I've created a report to show all new records in the Purchase Order Lines that don't have a corresponding purchase order # in the Purchase Orders table and a URL button to copy the information over, but it's a manual process I have to do each morning.
Thanks in advance!
I need to have *just* the PO# copied to a new table as the key field. I have tried creating a QB Action to copy PO# to the new table (Purchase Orders) whenever a new record is added to Purchase Order Lines table, but it tries to copy each new record, and I get webhook error because my import data has duplicate values for unique fields. It won?t even copy one instance.
Since the Purchase Order Lines table is also a details table, I've also tried a maximum value summary field to the master table, which would then push back the value to the details table. However, the QB Action triggered on the addition of a new record in the Purchase Order Lines table takes place before the data is pushed to the master table then back to the details table. So that does not work either.
Does anyone have a better solution that I could try? As a workaround I've created a report to show all new records in the Purchase Order Lines that don't have a corresponding purchase order # in the Purchase Orders table and a URL button to copy the information over, but it's a manual process I have to do each morning.
Thanks in advance!