How To Check if User Name Exist and prevent saving changes with same User name

How To Check if User Name Exist and prevent saving changes with same User name

  
How To check if UserName already Exist in form and how to prevent saving Same Username in the Entity 



When Entering UserName It Should promt user to that username exist in Exist 
You can use index on the username. (on the properties of your entity).

But since it's a system table, i do not know if you are able to change the properties. :/
What you could do is on your save action, get all the username's equal the username you are trying to save.
If the count is > 0 , this means there is already a user with that username. (then you can display a feedback message)
Hi Tarun,

On Save action you will need to write that code. At the start of action take one aggregate which will contain your user name. There give one condition that "user.username = Form1.uservariable name."

After that take one if block. You need to check whether the result of aggregate is empty or not.

If it is empty, proceed towards the create functionality else in false direction give one feedback message  and end your process there. You can also use inputfocus invalidate control from richwidgets which will keep focus in username text box.

I hope this helps.

Else share your sample oml file.

Regards,
Suraj Borade
Niels Favreau wrote:
You can use index on the username. (on the properties of your entity).

But since it's a system table, i do not know if you are able to change the properties. :/
What you could do is on your save action, get all the username's equal the username you are trying to save.
If the count is > 0 , this means there is already a user with that username. (then you can display a feedback message)
 
 No i have not used the system table ,i have created entity 
Tarun Kumar wrote:
Niels Favreau wrote:
You can use index on the username. (on the properties of your entity).

But since it's a system table, i do not know if you are able to change the properties. :/
What you could do is on your save action, get all the username's equal the username you are trying to save.
If the count is > 0 , this means there is already a user with that username. (then you can display a feedback message)
 
 No i have not used the system table ,i have created entity 
 You could easly use indexes then!