Hi all,
We currently utilise uniqueCounter in the following Pattern to generate mail value in AD:
$(knownAs).$(lastname)$(uniqueCounter)@domain
We have a requirement to start the uniqueCounter at 2, rather than 1, so if an account with firstname.lastname exists, it generate a mail value of firstname.lastname2 by default. Then if firstname.lastname2 exists, the next value would be firstname.lastname3, and so on.
You just need to statically specify the patterns (no number, then with 2, then with 3…) in the array / list…I would think…:
In some cases, dumber static approach gets deployed faster. And if you need to modify it down the road, there’s less of a hurdle / hoop to get through.
Alternatively, untested, I wonder if you can have a stack of usernameGenerators inside a first valid transform…like this:
First valid {
usernameGenerator for (fl, fl2, fl3, fl4, fl5, fl6, fl7, fl8, fl9),
usernameGenerator for (fl10,fl1{counter}, maxuniquechecks 9),
usernameGenerator for (fl20,fl2{counter}, maxuniquechecks 9),
usernameGenerator for (fl30,fl3{counter}, maxuniquechecks 9)
…etc.
}