Action chain sequencing is failing

Hi all,

I have a set of 4 tables, OrdersCP, Consumable Products, Consumable Packages and Packages. The use case is as follows:

  1. Consumable Products, Consumable Packages are children of (part of) OrdersCP.
  2. A Consumable Package consists of several Consumable Products (each of different quantity.)
  3. An OrderCP contains one or more Consumable Products and one or more Consumable Packages
  4. 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.

  1. Action Add Package Items

  2. Action Add to CP Order: loop

  3. Action Add to CP Order: add item

  4. Action Add to CP Order: incr copied

  5. 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.

Solved Solved
0 7 368
1 ACCEPTED SOLUTION

Iโ€™m still not quite understanding the data hierarchy, and exactly which data is used to create the records.


One way that Iโ€™ve converted an โ€œexecuteโ€ฆโ€ action, in order to make it run in serial, is as follows.

Child records in this case already each had a sequence number (1,2,3,4โ€ฆ) for them to be run in. I then added a Y/N Type [Complete?] column to each.

The Parent record had an โ€œexecuteโ€ฆโ€ action, which ran the Childโ€™s action, but only on the single record that matched

MINROW( โ€œchildโ€ , โ€œsequence numberโ€ , NOT( [Complete?] ) )

The Childโ€™s action was a group of 3 actions.

  1. Execute the desired action.
  2. Set [Complete?] to TRUE
  3. Loop. this is an โ€œexecuteโ€ฆโ€ action pointing back to the Parentโ€™s โ€œexecuteโ€ฆโ€ action.

View solution in original post

7 REPLIES 7
Top Labels in this Space