30
Views
5
Comments
I want to establish different views for different users in my application .
Application Type
Reactive

I want to establish different views for different users in my application .

2024-12-18 16-06-42
Junaid Syed

Hello Richard,

Could you please elaborate on what you mean by different views, is it referring to different landing screens or different view on same landing page or same landing screen with different look and feel?

Different Landing Screens - On the login button action you could check the role of logged in user and based on the assigned role redirect the user to intended screen.

Same Landing Screen but with Different View - On the login button action you can redirect the user to same landing screen, however on the screen add the logic to different sections/data of the screen to show/hide section/data based on the role of logged in user.

Same Landing Screen but with Different Look & Feel - On the same landing screen you could either apply the conditional CSS or might even create different sections with desired look and feel. Then apply the CSS or show/hide sections based on role of the logged in user.

Hope it helps!

Junaid

2025-03-12 07-08-15
Nilesh Trivedi
AI Generated

Hi @Richard Sandaramu, to establish different views for Admin, Project Manager, and Team Member roles in your application, you’ll need to implement a role-based view. Each user role can have customized permissions and interfaces based on their responsibilities.

Here are several steps.

1. Define User Roles Structure

  •     Create a Role entity in your database
  •     Create a UserRole junction entity

2. Implement Role Checking Logic

  •     Server Action - GetUserRoles
  •     Client Action - CheckUserRole

3. Create Different UI Flows

  •     Dynamic Screen Components

4. Implement UI Variations

Hope it helps.

Thank you.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2016-04-22 00-29-45
Nuno Reis
 
MVP

Hello.

No need to make things up. OutSystems already has Role and UserRole entities.

https://learn.outsystems.com/training/journeys/web-developer-662/role-based-security/o11/2307

You can make different pages, one for each role (and give access to no other role).

Or you can make a single page and use Ifs to show/hide different parts of it.


2023-11-02 09-23-34
Yogeshwaran P

Hi @Richard Sandaramu,

You can implement different views for different users by using the built-in Role-based security model. Define roles in your module, assign them using the built-in User_Role entity, and control access to screens by setting role permissions in the screen properties. You can either create separate screens for each role or use a single screen and conditionally show or hide UI elements based on the user's role. This ensures users only see content relevant to their assigned roles. 

Hope it Helps

Regards,

Yogesh

2018-08-26 20-34-32
Pankaj pant


Hi there,

You can achieve different views for different users in a Reactive Web App by using role-based UI logic. Here’s how you can implement it:

  1. Assign Roles to Users
    Go to Users > Roles and create roles like Admin, Project Manager, and Team Member. Assign them to users either manually or during registration.
  2. Use If Conditions to Show/Hide UI
    Wrap your UI blocks, buttons, or sections inside an If widget. Use role-checking logic like:

If (CheckAdminRole())

Show Admin-specific UI

Else If (CheckProjectManagerRole())

Show Project Manager-specific UI

Else

Show Team Member-specific UI

  1. Use Built-in Role Functions
    OutSystems provides role-check functions automatically when you define roles. Example:
  • CheckAdminRole()
  • CheckProjectManagerRole()
    These functions return true or false and help decide what to show.
  1. Redirect After Login
    In the login flow, after a successful login, check the user’s role and navigate them to their respective dashboard.

If CheckAdminRole()

Navigate to AdminDashboard

Else If CheckProjectManagerRole()

Navigate to PMDashboard

Else

Navigate to TeamMemberDashboard


  1. Secure with Role-Based Permissions
    Make sure to set role-based access on screens and server actions to prevent unauthorized access through direct URLs.

This approach keeps your application secure and user-specific. Let me know if you’d like a sample OML or help setting it up.


Thanks!


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