Hello,
Another question about table:
I would like to have a table column as a dynamic drop down list.
The list need to be build based on the login use's role.
Can this be done?
Thanks,
Laura
dynamic list for a table column
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You can build any type of dynamic drop down list - this part is relatively easy. But the more difficult question is how to get the user's role. I don't know how your logon mechanism is working, but the standard way to do this is to call the Logon Service and then build the roles there - and then a user can have any number of roles, not just one. If this is the way it's done on your system, then getting the user's role is difficult. After the logon has completed, the API just allows you to check whether a user has a named role e.g.
but there is no getRoles() method, so you can't loop through all roles.
How are you setting the user's role? Maybe we can think of another way.
Code: Select all
system.securityManager.hasRole("Role1");
How are you setting the user's role? Maybe we can think of another way.
0 x
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You only have to build the list for each row if the list has an additional field mapped to another table column. Otherwise it should be fine to just build the list once.
The fact that you don't see a dropdown implies that something is wrong with the list. You should check the list fields are correctly mapped, also you might check the debug option in the Dynamic List editor so you can see the SQL.
Regards
Jon
The fact that you don't see a dropdown implies that something is wrong with the list. You should check the list fields are correctly mapped, also you might check the debug option in the Dynamic List editor so you can see the SQL.
Regards
Jon
0 x
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
Who is online
Users browsing this forum: No registered users and 5 guests