My app for placing orders has different packs available, each containing different items.
For example, the PackDetails table:
PackName | Item | Qty
Fruit pack 1 | Apples | 1
Fruit pack 1 | Oranges | 2
Fruit pack 1 | Pears | 1
Fruit pack 2 | Plums | 2
Fruit pack 2 | Melons | 3
Orders can only be placed for complete packs, and up until now I’ve been breaking out the individual items on the back-end with Excel macros. I was reading a bit about using a webhook/API to add the different line items on the order automatically. So, if a customer orders
2 of fruit pack 2 (held in the Orders table), it would add 4 plums and 6 melons (by referencing the PackDetails table) to the OrderLines table for processing.
I followed the example that uses workflow to clone a row to another table after adding an item, and I at least got that working - finally. The select statements are proving much harder for me, so if someone has time to help me out I’d appreciate it.