Solved

Regarding hiding the values in Combo box

  • 5 July 2023
  • 3 replies
  • 61 views

Badge

HI team,
 

I want to hide combo box values based on the roles logged in to Universal. Can we achieve that in Software factory. If it possible can any of us guide me through this.

 

Example scenario - We are having Employee Details module for our app. In that module, there is an option called employee role which consists of Super Admin, Client Admin, Employee, HR, IT manager roles.

What I need is if the client admin logged into the application, we need to hide the combo box option in Employee role which is Super Admin option. 

 

So If any of us know the solution, kindly update in the forum. Thanks

icon

Best answer by Renée Evertzen 6 July 2023, 09:21

View original

This topic has been closed for comments

3 replies

Userlevel 4
Badge +3

Hello Prabhu,

Unfortunately this is not achievable through means of roles. A role can limit access to a table, a column, a task or even task parameters but not to domain elements.

There are a few different solutions that might be considered, for example:

  • Adding a task to change a role to Super Admin, that is only accessible for user groups with the role that has access to that specific task.
  • Splitting the Super Admin option from the combo box and instead changing it into a checkbox. This checkbox can then be either authorized or not, depending on the role.
  • Writing a default that throws a message to the user when someone who isn't authorized tries to modify an employee into a Super Admin.
  • And last but not least, you can choose not to use a domain with elements but instead use a look-up to a master data table that contains the options Super Admin, Client Admin, Employee etc. This master data table can then be set up in such a way that the Super Admin option is filtered away by a prefilter for users with certain roles.

I hope this helps! 😄

Badge

Hello Prabhu,

Unfortunately this is not achievable through means of roles. A role can limit access to a table, a column, a task or even task parameters but not to domain elements.

There are a few different solutions that might be considered, for example:

  • Adding a task to change a role to Super Admin, that is only accessible for user groups with the role that has access to that specific task.
  • Splitting the Super Admin option from the combo box and instead changing it into a checkbox. This checkbox can then be either authorized or not, depending on the role.
  • Writing a default that throws a message to the user when someone who isn't authorized tries to modify an employee into a Super Admin.
  • And last but not least, you can choose not to use a domain with elements but instead use a look-up to a master data table that contains the options Super Admin, Client Admin, Employee etc. This master data table can then be set up in such a way that the Super Admin option is filtered away by a prefilter for users with certain roles.

I hope this helps! 😄

 

Yeah I guess I can throw a message in default control procedure. Can anybody tell me how can I fetch the current login user details, I don’t know which way I can do that.

Userlevel 4
Badge +3

You can use the dbo.tsf_user() function to determine the username of the current user.