16
Views
6
Comments
Solved
"Disappear/Hide" a specific user from the dropdown

Hi,


How do I make a specific user disappear from a dropdown?

I create a filter in the database, but how do I say I only want that user?


(The user will be the "Administrator", can see and access everything but I don't want it to appear in the dropdown. 

I created a role for him as "Mananger")

Thanks


Rank: #70
Solution

That's true.

The "best" way is then to get the users without that Role.

You can do that by importing the dependency for User_Effective_Role entity from System (view with the roles each user has):


Then your query should have the following WITH OR WITHOUT join between User and User_Effective_Role entity with the Manager role on the JOIN condition:


And now add the filter to User_Effective_Role.User_Id = NullIdentifier():


In this way, you are getting the users who don't have the role Manager.


Regards,
João

Rank: #415

Hi SpiritFox,

You can add a filter ({user}.[id] <> <<administrator id>>) into the aggregate to exclude administrator from dropdown on the screen.

Thanks & Kind Regards,

Sachin

mvp_badge
MVP
Rank: #76

Hi Spirit Fox,

For the mentioned use-case, I would suggest defining a filter condition in the Aggregate (Filter tab) of which the result set is mapped with the respective Dropdown widget i.e.

Explanation: 

Assuming that, to store the user-type values, you might have used a static type entity. Let's call it UserType static entity. The defined screen aggregate to populate the respective dropdown would have  UserType static entity as its source entity. So the filter condition would be something similar to as mentioned below.

UserType.Id <> Entities.UserType.Admininistrator

Hope this helps you!


Kind regards,

Benjith Sam

Rank: #70

Hi SpiritFox,


You can add a filter on the query, User.Username = "admin" in order to only get that user or User.Username <> "admin" if you want to choose all but the administrator user.



Hope it helps.


Regards,
João