Five Stars Moe
Five Stars

Serial ....

Hi, I have an excel that has 1 column: ID

I want to load it in a table that has 2 columns: ID and Serial

The ID is straight forward from excel... But I want to load in the serial something like this:

- If same ID has more than one entry (for example 3 entries), it should be like this:

ID    Serial

1      001

1      002

1      003

 

While if the next ID is different I want to reset the serial to 001:

ID    Serial

1      001

1      002

1      003

2      001

3      001

3      002

4      001

5      001

etc....

 

 

4 REPLIES
Twelve Stars TRF
Twelve Stars

Re: Serial ....

Use something like that in a tMap to fill the Serial field:

Numeric.sequence("Id", 1, 1)

This will generate as specific sequence for each value of the Id field.

That's what you need.


TRF
Five Stars Moe
Five Stars

Re: Serial ....

Thank you, yes Im using it but how to reset it when you encounter different ID

Twelve Stars TRF
Twelve Stars

Re: Serial ....

Sorry,

 

Assume the flow is row1, use this:

Numeric.sequence(row1.Id, 1, 1)

The sequence name will change each time the id value change.


TRF
Twelve Stars TRF
Twelve Stars

Re: Serial ....

Did this answered your case?
If so, don't hesitate to mark this topic as solved.

TRF