-
JD Cox
-
Topic Author
-
Offline
-
Posts: 95
-
-
|
I'm trying to add a line of data to an order when the piece count is greater then one (1)
In the attached there are four steps:
Step 1 - Copy the file to memory
Step 2 - Add item Z if item C or X are on the order
Step 3 - Count the total pieces on each order after step 2 items are added
Step 4 - Add item Y to an order if the piece count is greater then 1
My problem is with Step 4. When the condition is met it's adding Y after every line on the order.
I understand why it's doing that but I can't figure out how to only add one line when the condition is met.
Thanks, JD
|
Please Log in or Create an account to join the conversation.
|
-
FlowHeater-Team
-
-
Offline
-
Posts: 391
-
-
-
-
|
Hi JD,
The reason why is, you read the
InMemory Adapter Table
SKU_ADD row by row and import each line/row to a new InMemory Table COUNT_ADD. For every line you check whether the pieces count is greater than 1. If yes you add for every row one additional row.
I´ve modified your definition, see attachment. Here I added to more steps, your original steps 4 has been disabled.
Step 5) Read InMemory Table SKU_ADD ordered and group this dataset by field S_Customer. Filter all rows with pieces count less than one. Add one new row to the same InMemory Table SKU_ADD.
Step 6) Output the InMemory Table SKU_ADD order by the fileds S_Order and S_Customer to a
CSV text file
.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
|
Please Log in or Create an account to join the conversation.
|
-
JD Cox
-
Topic Author
-
Offline
-
Posts: 95
-
-
|
Thanks Robert
I wasn't aware I could write more data to the InMemory table. That works great.
Thanks again, JD
|
Please Log in or Create an account to join the conversation.
|
Time to create page: 0.113 seconds