cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Need UDF help to implement logic in message mapping to increment sequence based on Context value

varun_k
Contributor
0 Kudos
163

Hi Team,

I have requirement as below where I need to add increment number sequence based on the context value.

1st value should have sequence as 1 and if it has same value in next context, it should increment by 1 (for all the values in that context)

eg:

20996_1
20996_1

<Context Change> (below 2 entries should be increment by 1 and should have same increment value)
20996_2
20996_2

I am already sorting the records and this is a sample output

varun_k_0-1747652687379.png

Expected Output is

 

20917_1
20918_1
20919_1
20992_1
20992_2
20992_2
20920_1
20921_1
20922_1
20990_1
20990_1
20914_1
20915_1
20916_1
20996_1
20996_1
20996_2
20996_2
20999_1
20999_1
20999_1
20999_1

I think this can't be achieved with standard functions, please help with UDF to achieve it.

Thanks,

Varun

Accepted Solutions (0)

Answers (2)

Answers (2)

varun_k
Contributor
0 Kudos

Hi Team,

I have managed the logic using standard functions and its working fine.

Thanks,

Varun

helmut_skolaut3
Contributor
0 Kudos

Hi Varun

solve this with XSLT and Muenchian grouping. That is very easy code (even complex to understand). If you like to have everything else in the graphical playground, it's possible to combine the two technologies.

BR Helmut