Hi all,
I have a set of 4 tables, OrdersCP, Consumable Products, Consumable Packages and Packages. The use case is as follows:
- Consumable Products, Consumable Packages are children of (part of) OrdersCP.
- A Consumable Package consists of several Consumable Products (each of different quantity.)
- An OrderCP contains one or more Consumable Products and one or more Consumable Packages
- When a Consumable Package is added to an Order, its constituent Consumable Products need to be added to the Products table.
I have actions defined to do #4 in tables Orders, and PkgItems and it works fine if there is 1 PkgItem in an order but it doesn’t work when there are 2 or more PkgItems in an Order.
The action chain doesn’t seem to process the PkgItems in sequence and creates more lines in Consumable Products than needed.
Here are the actions and some details I have set up.
-
Action Add Package Items
-
Action Add to CP Order: loop
-
Action Add to CP Order: add item
-
Action Add to CP Order: incr copied
-
Action Add to CP Order: repeat
This seems like a bug but maybe there is a different way to set it up. I think the repeat action is the culprit but I am not sure.
@Steve @Aleksi @Phil - any suggestions?
Thanks.