Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Up to 100,000 records can be processed with the freeware version!
Flowheater Chart

GroupBy AutoID

More
13 years 3 months ago #2153 by JD Cox
GroupBy AutoID - Post(2153) was created by JD Cox
Need to number line items from a flat file of orders during the import. Orders with more than one line item are numbered 1, 2, 3, etc… I have researched this and tried several things but cannot get the desired results. Using the GroupBy function on the order number and the AutoID function (GroupBy) it comes close. It starts with 1 on the first record then 2 with the second even if it’s another order. However, multi line orders it numbers in sequence but starts with 2 as does every record but the first.

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

More
13 years 3 months ago #2154 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:GroupBy AutoID - Post(2154)
hi,

i guess you have just forgotten to switch on the autoid "groupby effect on" option?



i've made a little example to demonstrate how it’s works. please have a look to the attachment.

note: the groupby heater only works proper with sorted records !

Attachment autoid_and_groupby.zip not found


Best wishes
Robert Stark

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

More
13 years 3 months ago #2155 by JD Cox
Replied by JD Cox on topic Re:GroupBy AutoID - Post(2155)
Robert, thanks for the reply. However, I did not forget the GroupBy Effect I tried to show that in my post. I do appreciate the .zip file. Where you have the ID GroupBy it gives a total count of the records in each group. I want to show each record in the group numbered 1, 2, 3, etc… which we use on the write side. Thanks again JD

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

More
13 years 3 months ago #2156 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:GroupBy AutoID - Post(2156)
This you can do with the help of the .NET Script Heater and the following little script.
Code:
int iOrderCount = 1; string sLastOrder = String.Empty; public object DoWork() { if (InValues.Length != 1) throw new Exception("one input parameter expected"); // get the first input parameter string sOrder = (string)InValues[0].GetString(); if (sLastOrder == sOrder) { iOrderCount++; } else { iOrderCount = 1; } sLastOrder = sOrder; return iOrderCount; }

Attachment custom_groupby_autoid.zip not found


Best wishes
Robert Stark

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

More
13 years 2 months ago #2157 by JD Cox
Replied by JD Cox on topic Re:GroupBy AutoID - Post(2157)
Robert I cannot thank you enough…that’s exactly what I’ve been trying to do.

I’ve been programming with access for over 10 years. Flowheater has made importing and exporting data so much easier. And now it looks like I’m going to need to learn a little more about the .NET script.

Thanks again, :)

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

Time to create page: 0.277 seconds
FlowHeater Logo

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Legal information

Support & Contact

Contact

Phone:
0951 / 9933 9792

eMail:
This email address is being protected from spambots. You need JavaScript enabled to view it.


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