FlowHeater - The Data Import / Export Specialist
See also the general examples available, which may answer your question: Hello World 1 / 2 / 3 , format numbers as character strings , simple If-Then-Else , complex If-Then-ElseIf , filtering and grouping data , consolidate grouped values

Add import data

  • JD Cox
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 year 2 months ago #3661 by JD Cox
Add import data was created by JD Cox
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
Attachments:

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #3662 by FlowHeater-Team
Replied by FlowHeater-Team on topic Add import data
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 .


 

File Attachment:

File Name: inmemory-e...1-08.zip
File Size:35 KB

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
  • Premium Member
  • Premium Member
More
1 year 2 months ago #3663 by JD Cox
Replied by JD Cox on topic Add import data
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.313 seconds

other Languages

de

FlowHeater Home

de en

Imprint/Contact

Privacy Statement

Copyright © 2009-2023 by FlowHeater GmbH.
All rights reserved.

Follow us on

twitter  facebook

YouTube

 de en