I have 2 SQL tables that work toghether as a bill. One has name of a person, date, and ItemID that links to other table, where it can be seen which items does he want to have or buy.
Tables look like this:
I want to insert the last added row in table1, but also all the items that belong to that row.
For example the complete row for the Xero bill should look something like this, for last row in table1:
All in one row and in arrays, so it can be imported to Xero bill.
Can this be done somehow through Zapier? I know it has a Format option, where you can get line items from array. But not sure how to do it from 2 tables like this.
Best answer by Paolo
Based on the screenshots, it seems that both tables have “ItemID” as a common field. You could work around this by creating a Zap that has a “Find Row” Action. The structure of the Zap would be:
- Trigger: SQL Server New Row
- Action: SQL Server Find Row
- Action: Formatter Line Itemizer
- Action: Create Xero Bill
The Zap would trigger from the new row added on the first table and the Find Row action would then pull in the data from the second table using the ItemID as a search parameter. The Formatter step would combine both data sets and create the line items that the Create Xero step needs to function.
I hope that helps and please don’t hesitate to reply back if you have questions!