03/15/2023 10:07 AM
Hello, my team is looking to capture the information on all the users that have selected the "Does not work for me" action during a user manager campaign in a report and possibly a dashboard view. Is there a way to pull out that information in a report and to whom the re-assigned manager is?
03/15/2023 12:24 PM
Hi @William3squivel ,
Thanks for reaching out. You can try the sample query below which will give the output for all 'Does Not Work for Me' action taken across campaigns.
The Audit Trail Column stores the new owner data.
SELECT
campaign.campaign_name AS Campaign,
c.CERT_NAME AS 'Certification Name',
u.username AS 'Certifier User Name',
cu.username AS 'Username',
CASE
WHEN cus.certified = 2 THEN 'Works For Me'
WHEN cus.certified = 3 THEN 'Does Not Work For Me'
WHEN cus.certified = 4 THEN 'Terminated'
END AS 'Employment Status',
cus.audittrail AS 'Audit Trail',
cus.updatedate AS 'Updated Date'
FROM
campaign
INNER JOIN
certification c ON c.campaignkey = campaign.id
INNER JOIN
users u ON u.userkey = c.certifier
INNER JOIN
certification_user_status cus ON cus.certkey = c.certkey
INNER JOIN
certification_user cu ON cu.cert_userkey = cus.cert_userkey
WHERE
cus.certified = 3;
You can incorporate the above query in a dashboard view too.
Thanks.