There may be a simple solution for this but it's not coming to me at the moment.
I need to compare the output data from my workflow to an existing spreadsheet. If the row of data does not exist in that spreadsheet I need to append it.
For Example:
Here's my output data:
Item | Color | Size |
Shirt | White | XS |
Shirt | White | S |
Shirt | White | M |
Shirt | Red | L |
Shirt | White | L |
Shirt | White | XL |
And Here's the data in my existing spreadsheet:
Item | Color | Size |
Shirt | White | XS |
Shirt | White | S |
Shirt | White | M |
Shirt | White | L |
Shirt | White | XL |
I need to append the row that does not exist in the spreadsheet to the end of the spreadsheet. So my spreadsheet looks like this at the end:
Item | Color | Size |
Shirt | White | XS |
Shirt | White | S |
Shirt | White | M |
Shirt | White | L |
Shirt | White | XL |
Shirt | Red | L |
Solved! Go to Solution.
Hi,
You can just Join the output data and the data from the existing workflow by the three fields. Depending on how you connect to the Join either the L or R output will be the rows that are not in the Spreadsheet.
You can then write those records to the spreadsheet and use the "Append to Existing Sheet" option within the Output data tool.
Cheers,
Bob
Is there a "KEY" on the transactions?
@Bob_Blackey wrote:Hi,
You can just Join the output data and the data from the existing workflow by the three fields. Depending on how you connect to the Join either the L or R output will be the rows that are not in the Spreadsheet.
You can then write those records to the spreadsheet and use the "Append to Existing Sheet" option within the Output data tool.
Cheers,
Bob
Ah I realize my mistake now. This was my original approach but I was expecting 14 records in the left output, however, I was getting 759 on the left, and 745 on the right. I couldn't understand why those 14 were getting lost!
This morning I realized that both tables contain 8 fields, and I was only joining on 7. Your workflow and a fresh set of eyes helped me catch this.
@Thank you very much @Bob_Blackey !!!
Glad to help, a second set of eyes is often one of the most powerful tools!
Bob