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.
Flowheater Download

GroupBy AutoID

More
12 years 6 months ago #2153 by JD Cox
GroupBy AutoID 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 to join the conversation.

More
12 years 6 months ago #2154 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:GroupBy AutoID
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

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.
Attachments:

Please Log in to join the conversation.

More
12 years 6 months ago #2155 by JD Cox
Replied by JD Cox on topic Re:GroupBy AutoID
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 to join the conversation.

More
12 years 6 months ago #2156 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:GroupBy AutoID
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

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.
Attachments:

Please Log in to join the conversation.

More
12 years 6 months ago #2157 by JD Cox
Replied by JD Cox on topic Re:GroupBy AutoID
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 to join the conversation.

Time to create page: 0.306 seconds

FlowHeater - The Data Specialist

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

Rechtliches

Support & Contact

Kontaktinformation

Telefon:0951 / 99339792 E-Mail:This email address is being protected from spambots. You need JavaScript enabled to view it.

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