I want to crate username using first 5 chars from lastname + first 2 chars from firstname. below transform will solve my problem but
Que 1: how can I use unique counter as A-Z
instead of numeric incremental values?
Que 2: if lastname or firstname is less than desired 5 or 2 substring will it return whatever default identityAttribute
value?
e.g.
firstname = adam
lastname = smith
then my username should = smith.adz
(If a user exists in IDN or Active-Directory, Add A-Z to the user-login generated until a unique name is found.)
{
"attributes": {
"cloudMaxSize": "100",
"cloudMaxUniqueChecks": "26",
"cloudRequired": "true"
},
"isRequired": false,
"multi": false,
"name": "NETID",
"transform": {
"type": "usernameGenerator",
"attributes": {
"sourceCheck": true,
"patterns": [
"$ln$fi${uniqueCounter}"
],
"ln": {
"type": "substring",
"attributes": {
"input": {
"type": "identityAttribute",
"attributes": {
"name": "lastname"
}
},
"begin": 0,
"end": 5
}
},
"fi": {
"type": "substring",
"attributes": {
"input": {
"type": "identityAttribute",
"attributes": {
"name": "firstname"
}
},
"begin": 0,
"end": 2
}
}
}
},
"type": ""
}