Could someone help me identify what is the best way to avoid the addition of users with the same name? I Am new in OutSystems and I work on my first reactive web app.
Regards
Pratiksha
Hi Pratiksha Dabhade,
I did some code changes in the shared module as per your requirement.
PFA - includes the .oml solution with code changes.
Hope this helps you!
Regards,
Benjith Sam
Benjith Sam wrote:
Thanks Benjith Sam.
Hello pratiksha,
Did you test my solution? There is any problem or something that not works correctly?
pratiksha Dabhade wrote:
LuÃs Cardoso wrote:
I also tested your solution. and it is really helpful for me. thank you so much
Hi
you need to check IfUserExist like attached screen shot
Salman Ansari wrote:
Currently my Tree-like these, so where I can add your validation.
Please suggest.
Before Create/UpdateTask you can call "User_AlreadyExist" action and based on true/false from AlreadyExist you can give some feedback message like "User Already exist"..Let me know if have any concern
hai pratiksha,
You can set unique index for your attribute, so that you can't able to add same name again. When you try to add same name it showing an error.Thanks and regards,Gnanavel Sivasankaran.
Hi Pratiksha,
You can also use other way like you can check user is exits or not on "onChange" property of input box. You can use ajax to check if user exit or not. So, that you can check it on the page itself at once.
thanks....
Hello,
To check if user exist the best approach is make a query to check if user extis:
You need to add 2 conditions:
1. User.username = Username (to check if username already exists)
2. User.id <> UserId (to check if is a different record, because if you are editing the ID will be the same)
After call the entity check if is empty: If is not empty is beacuse exists a record with the same username on DB and you need to exit the flow and show a error.
Hope this can help you.
BR,
Luis
Firstly I Create a "User_alreadyExist server" action than in that action I developed the below logic.
Is it correct for avoiding the addition of users with the same name.
Please suggest me
Please take some decision based on the User_AlreadyExist action.like
If (User_AlreadyExist=true){
Alert("User already exist")
}else{
Call CreateOrUpdateTask
}
Can you share your module (oml file) to give a look on the app?
Hello Luis,
How can I send file? means where?
You Can save the module to your disk and upload here in a post as attachment
Please Find attachment.
Regards ,
Hi!
Send in attachment the oml file fixed. Can you test it?