How to have actions before the screen appear whithout having delay ?

I have a mobile app ,i need to know the user role before the screen appears to handle widgets visibility,

checkRole is not available client side so i tried two things:

1-haveng a "Fetch data from other sources" thats get the user and return the user role.

2-having this logic in OnInitialize action of that screen.

both of these solutions have a delay, First one delay the loading of the widgets, Second one delay the appearance of the screen.

so what is the way to know the user's role without having that delay ?


I don't know what kind of information you want to load, but usually during the Splash Screen, information is loaded, and placed in tables, for example, so that some screens/information can be loaded faster.

Cheers,
Nuno Verdasca

Nuno Miguel Verdasca wrote:

I don't know what kind of information you want to load, but usually during the Splash Screen, information is loaded, and placed in tables, for example, so that some screens/information can be loaded faster.

Cheers,
Nuno Verdasca

The only thing i want to load is the roles ,but i can't check that in client side so i used an aggregate to fetch the logged in user and his role, and i think that placing it in the splash screen is not a  good thing because it will run before the user log in ,i want to do that after logging in and before rendering the screen

Hello Muhammed, 

Please, take a look here on how to work with roles client side. Jorge is pointing to the right documentation. 

https://www.outsystems.com/forums/discussion/26565/define-role-access-to-a-mobile-app/

You basically will create actions (functions) with Javascript that return if the user has or not some Role. 

After that, you can use them normally in your screen with IF widget, or visibility properties. 

Hope this helps. 

Cheers