How to avoid duplicate username when you add new user


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


mvp_badge
MVP
Solution

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

PractiseBEN.oml

Benjith Sam wrote:

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


Thanks Benjith Sam

mvp_badge
MVP

Hello pratiksha,  

Did you test my solution? There is any problem or something that not works correctly?


pratiksha Dabhade wrote:

Benjith Sam wrote:

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


Thanks Benjith Sam



Luís Cardoso wrote:

Hello pratiksha,  

Did you test my solution? There is any problem or something that not works correctly?


pratiksha Dabhade wrote:

Benjith Sam wrote:

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


Thanks Benjith Sam




I also tested your solution. and it is really helpful for me. thank you so much

mvp_badge
MVP

pratiksha Dabhade wrote:


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


you need to check IfUserExist like attached screen shot


A5AC65ED31E5407AB9411A1A5B7B4A3E.jpeg



Salman Ansari wrote:

pratiksha Dabhade wrote:


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


you need to check IfUserExist like attached screen shot




Currently my Tree-like these, so where I can add your validation.

 Please suggest.

mvp_badge
MVP

pratiksha Dabhade wrote:



Salman Ansari wrote:

pratiksha Dabhade wrote:


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


you need to check IfUserExist like attached screen shot




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.

pratiksha Dabhade wrote:


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,

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....


mvp_badge
MVP

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


Regards,

Pratiksha



mvp_badge
MVP

pratiksha Dabhade wrote:

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


Regards,

Pratiksha



Hi 


Please take some decision based on the User_AlreadyExist action.like

If (User_AlreadyExist=true){

Alert("User already exist")

}else{

Call CreateOrUpdateTask

}


mvp_badge
MVP

Can you share your module (oml file) to give a look on the app?

Luís Cardoso wrote:

Can you share your module (oml file) to give a look on the app?


Hello Luis,

How can I send file? means where?

mvp_badge
MVP

You Can save the module to your disk and upload here in a post as attachment

Luís Cardoso wrote:

You Can save the module to your disk and upload here in a post as attachment


Please Find attachment.

Regards ,

Pratiksha

Practise.oml

mvp_badge
MVP

Hi!

Send in attachment the oml file fixed. Can you test it?

PractiseLUIS.oml

mvp_badge
MVP
Solution

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

PractiseBEN.oml

Benjith Sam wrote:

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


Thanks Benjith Sam

mvp_badge
MVP

Hello pratiksha,  

Did you test my solution? There is any problem or something that not works correctly?


pratiksha Dabhade wrote:

Benjith Sam wrote:

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


Thanks Benjith Sam



Luís Cardoso wrote:

Hello pratiksha,  

Did you test my solution? There is any problem or something that not works correctly?


pratiksha Dabhade wrote:

Benjith Sam wrote:

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


Thanks Benjith Sam




I also tested your solution. and it is really helpful for me. thank you so much

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.