Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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....
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.
Thank you, yes Im using it but how to reset it when you encounter different ID
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.