I have created a simple screen and have written branch conditions in the login event, but after clicking the login button, I cannot enter different screens separately. What should I do?
Hi, did you tried what I said yesterday. I don't see a problem here. It works fine. Anyways will again try to explain in steps -
1. Here input parameter is missing. Pass GetUserId() .
2. As you have custom roles in screen, remove Registered roles check from Doctor and Patient screen (If you don't remove Registered role, then any user who has a active account created in the same platform environment your app runs, will able to login irrespective of custom roles. )
3. In order to test the scenario, that on login redirect directly to Patient screen, login with user credentials who has only Patient role assigned .
4. Go to User Management app, you either create a new user (or change your role permission)
5. Created a dummy user .In roles section, search with role name and add.
6. Check this demo link. Username -dummy user, Password-dummyuser123. This will work as per your requirement. Hope this helps!
You can manage user roles from the User Management backoffice app. To access it, you can type the following URL in your web browser: "https://<SERVERNAME>/Users" where <SERVERNAME> is the host name of the server you're working on.
Hi, I saw your check Patient Role action has no input parameter.
Is that the problem.
Otherwise, I think everything else is just fine.
Just add the input UserId to that checkPatientRole and it went well.
After logging in, I can only reach the doctor screen. How can I click the login button to enter the patient screen?
Hey @Naku Sitsu,
Try not to create multiple post of same questions, it will not be encouraged.
Regards,Nandhakumar S.
Hi @Naku Sitsu ,
After you add the user Id assign for Patient role check, your code is fine. Firstly, since you have custom roles, then you should removed Registered role check from screens. And second to test the scenario that on click the login button to enter the patient screen, login with the user who has only Patient role assigned. It will work.
And second to test the scenario that on click the login button to enter the patient screen, login with the user who has only Patient role assigned. It will work.
How can I make modifications about this? Thank you very much!
adding this for your reference, in case you need more details - https://www.outsystems.com/forums/discussion/7399/how-to-manage-users-and-roles/
I still cannot enter different screens based on different characters. Can you help me?
The only thing caused your problem is you did not logged in with a Patient Role user.
Follow Puja Rani's guide to create Patient Role user, and use that user to login, your website will redirect to the Patient screen.
good luck :)
Thank you for your reply. But I can't open the User Management app, what should I do?
you need to access it via browser.
https://<your enviroment>.com/Users/
In browser you have to open URL- " https://<SERVERNAME>/Users " where in place of <SERVERNAME> provide the host name of the server you're working on (in your case if your app in hosted in this server as shown in screenshot, then URL will be - https://rxg.outsystemscloud.com/Users/
I think this will will help and try to create two new users one with patient role and other with doctor role
Regards,
Jitendra
Thank you very much!!!