I need to create a sequence based on the data in a column, the sample table is as follows:

The sequence to be provided is like, if group = bfd then new_id = id + sequence in <0-200> if group = klm or kln then new_id = id + sequence in <201-499>
The output should be something like:
I tried using 2 Sequence generators, first starts from 0 and increment by 1. second starts from 200 and increment by 1, Then using IIF in expression transformation seq_1 = attach NEXTVAL from sequence generator 1 seq_2 = attach NEXTVAL from sequence generator 2
new_id = TO_INTEGER ( IIF( group ='bfd', id || seq_1,
IIF( group = 'klm' or group ='kln', id || seq_2)
)
)
But the above logic gives output as follows..
The sequence needs to be generated only for the mentioned group..
Is there a way I could achieve this in informatica.. using a UDF or modifying any of my existing logic
Thanks for the help!

