Issue with Login Screen and Button Click
Application Type
Mobile

Hi,


I am totally new to Outsystems ( just 3-4 days old). I am developing a mobile application and am facing the below issues. I shall be thankful to anyone who could share meaningful answers please:

1) Why the "Login" Screen inside Common folder in UI FLows gets loaded first on publishing the application. I have tried to over ride it by creating a new screen (Input) under MainFlow and then putting that value in "Default Screen" at the application level. Still the Login screen gets loaded first. Is there anyway to override this default behavior and start with a different screen than the "Login" screen. 


2) I clicked the "Login" button on "Login"screen and changed the value of "On Click" event to a screen I created  ("Input") under MainFlow. On publishing the application and opening it, I clicked the "Login" button after entering the user name and password, it still reopens the same  "Login" screen as if it is a screen refresh. I am unable to understand why this behavior is happening.  


I am attaching the oml file for reference. 

CorporateInsights.oml

1- First, you need to see that there is an OnException. In this exception its going to control how the session works

In this image, you can see that, if you are trying to go to a screen that the user doesn't have an ID, so, the OnException will redirect you to the screen login...


2- The second question you made, I give you almost the same answer, if you are trying to access a screen without Id or logged User, the OnException will redirect you to the login screen.

Kind Regards,

Márcio

Hi Marcio,


Thanks for the valuable inputs. May I also ask you that how can I assign an ID to a screen in Outsystems. 

That shall help solve this issue completely. 

Jayant

mvp_badge
MVP

Hi Jayant,

Welcome to the world of OutSystems.

In addition to Márcio comment.. If you want the screen to be accessible without the user getting logged in, you will have to check the Screen Anonymous Role in the Input screen property section as shown below.

System roles:

  • Anonymous: Allows any end user to access the element, including users that are not logged in (non-authenticated users). Anonymous is the most general Role and when you associate this Role, for example with a screen, all of the existing Roles are automatically associated with it.

  • Registered: Allows any end user who has logged into an Application running in the same platform server (authenticated users) to access the element. 

For more info refer this documentation link: Application | User Roles


In addition, I would also suggest you to take the Reactive Web Development course: https://www.outsystems.com/training/paths/18/becoming-a-reactive-web-developer/

Check out the available course: https://www.outsystems.com/training/courses/

Training Paths: https://www.outsystems.com/training/paths/


I hope this helps you!


Kind regards,

Benjith Sam

You can make the screen anonymous has Sam shared. and that will solve your problem for now.

But if you want to be logged/registered you need to have an Id during your session. So, the Id is already created, what you just need to do is

You should call this screen action when you click on the button Login


Hi Marcio,

Thanks for the revert. Based upon the inputs from your and Benjith's end, below is what I decided to do:

1) Call the login screen as the start screen so I made Default Screen as "Common\Login"

2) The Input screen in the Main folder should be called on clicking the Login button in "Login"screen, so I still persisted with On Click event for Login button as "MainFlow\Input"

3) Further, I checked both "Anonymous" & "registered" for the Input screen

On publishing the application and opening it in browser, I am getting the below, the Login button is not getting loaded fully and the timer on the button keeps running endlessly. Further after entering the credentials and clicking the button, nothing is happening. Any suggestions, why this is happening


Hi Marcio,

One more question in addition to the above, I am absolutely fine with calling the Screen Action "Login" on button click "Login" . But then how shall I get the screen "Input" inside MainFlow loaded on clicking this button. 


Jayant

Hi Marcio,

Request you if you could help with some inputs here as well please, I have mentioned 2 queries above in the thread. 

Jayant

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