I am wanting to create a dropdown with choices from a Participant group or our AD groups we assign to that participant group (to allow one participant to assign action steps to a specific person in another participant group). I’m still searching the documentation and forum for examples but have not found anything yet. Is this something I should do by querying in code-behind or a SQL stored procedure?
In our case, we set members in this list, which are in a participant group.
DECLARE @IdProcess int
SET @IdProcess = (SELECT TOP 1 ID_PROCESS FROM WFPROCESS
WHERE NAME = 'PROCESS_NAME'
ORDER BY ID_PROCESS DESC)
SELECT '' AS id, '- Sélectionner une personne ...' AS value
UNION
SELECT dbo.USERS.USERNAME as id,dbo.USERS.LASTNAME + ' ' + dbo.USERS.FIRSTNAME as value
FROM dbo.WFPROCESS
INNER JOIN dbo.WFPARTICIPANT ON dbo.WFPARTICIPANT.ID_PROCESS = dbo.WFPROCESS.ID_PROCESS
INNER JOIN dbo.WFPARTICIPANT_MAPTO ON dbo.WFPARTICIPANT_MAPTO.ID_PARTICIPANT = dbo.WFPARTICIPANT.ID_PARTICIPANT
INNER JOIN dbo.GROUPS ON dbo.WFPARTICIPANT_MAPTO.ID_GROUP = dbo.GROUPS.ID_GROUP
INNER JOIN dbo.USERS_GROUPS ON dbo.USERS_GROUPS.ID_GROUP = dbo.GROUPS.ID_GROUP
INNER JOIN dbo.USERS ON dbo.USERS.ID_USER = dbo.USERS_GROUPS.ID_USER
WHERE (dbo.WFPARTICIPANT.ID_PROCESS = @IdProcess) AND (dbo.WFPARTICIPANT.NAME = 'PARTICIPANT_NAME') AND dbo.USERS.ACTIVE = 'Y'
UNION
SELECT dbo.USERS.USERNAME as id,dbo.USERS.LASTNAME + ' ' + dbo.USERS.FIRSTNAME as value
FROM dbo.USERS INNER JOIN
dbo.WFPARTICIPANT_MAPTO ON dbo.USERS.ID_USER = dbo.WFPARTICIPANT_MAPTO.ID_USER INNER JOIN
dbo.WFPARTICIPANT ON dbo.WFPARTICIPANT_MAPTO.ID_PARTICIPANT = dbo.WFPARTICIPANT.ID_PARTICIPANT
WHERE (dbo.WFPARTICIPANT.ID_PROCESS = @IdProcess) AND (dbo.WFPARTICIPANT.NAME = 'PARTICIPANT_NAME') AND dbo.USERS.ACTIVE = 'Y'
ORDER BY value
You need to replace “PROCESS_NAME” and “PARTICIPANT_NAME’”.