Username Generation for Different Categories of Users

Regular Contributor
Regular Contributor


We have a requirement to generate usernames in sequential numbers for various categories of users created via Created User Form.

We have five categories of user, of which 4 categories of users we are generating Category Code (from dynamic attribute) + Auto Increment in username generation. (Eg: INC11243)

But for one type of user, we would be manually filling the username in the form itself , in one of the dynamic attributes which we have mapped to username.

We cannot write an advanced query to define this, as Auto increment function isn't available in MYSQL, hence using a basic rule.

When we input the username for the fifth category of user, it overwrites the username generated by the user register rule and we are not able to accomplish the use case.

Any workaround?

Let me know if you need more input.



Can you share snip of request form and current query


The attribute PIN is mapped with username for only this type of user. For others, username should be generated from add register rule:


cp34 holds a categorycode


The username generation rule should trigger for 4 types of users but for one type of user the username should be mapped to the value input within the form

You can bring logic on dynamic attribute for auto incremen

We can generate greatest (MAX) +1 from users customproperty and ars tables. However, if multiple users open the create user form simultaneously, then this would generate the same highest value for all the users who are using the form con currently

In that case user creation will be failed but those corner case can be managed