Publié Mon, 05 Oct 2020 16:39:15 GMT par Steve Shriver Application Specialist
Is it possible to use the users assigned to a Role or Group as a select list in a Store Dialog?

The internal list 'Users' will contain all users and some may not be appropriate. 

DocuWare does not supply the list internally. Is it possible to make one?
Publié Mon, 05 Oct 2020 19:39:56 GMT par Josef Zayats
Steve,
If you have an on-premise system, you can do the following:
Enable  "Allow database Access via SQL statement" on your system (in Docuware Administration)
Create a new select list - using external database - in database configuration select Authentication database connection - and type the following  SQL statement. This will give you desired select list
----
select a.name from dwuser a, dwgroup b, DWUserToGroup c where a.uid=c.uid and b.gid=c.gid and b.name='DesiredGroupName'
-----

The following command will give you list of users assigned to a role directly (not via group membership)
---
select a.name from dwuser a, dwroles b, DWUserTorole c where a.uid=c.uid and b.rid=c.rid and b.name='DesiredRoleName'
-----

I do not believe this is possible with Docuware Cloud system without going to API programming.
Publié Tue, 06 Oct 2020 08:06:54 GMT par Fabian Kall - left 01.22

@Josef:
I agree, however I believe Your second statement (mapping users to roles) is neglecting that users can be members of a role not through direct membership (reflected in table DWUserToRole) but through being a member of a group which in turn is a member of the role "DesiredRoleName".

However, in 7.3 on-premise systems You can leverage the new possibility to create filtered select lists.

I create a view on the database that maps users and the roles they are members in. For this,I use a UNION statement to basically combine Your statement with a similar statement that joins users to roles via group memberships.
Then I create filtered select lists using the view as a data source where I filter for the desired role name to get a select list of all users that have a membership in that role.
 

You must be signed in to post in this forum.