12-02-2022 05:42 AM
Hi,
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.
12-02-2022 09:36 AM
Can you share snip of request form and current query
12-05-2022 10:26 AM
Hi,
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
12-05-2022 03:28 PM
You can bring logic on dynamic attribute for auto incremen
12-05-2022 11:51 PM
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
12-06-2022 08:04 PM
In that case user creation will be failed but those corner case can be managed