Query to list Service Request Approver and Purchase Request Approver (MSSQL & PGSQL)
Tested in Build PGSQL (14300) or MSSQL (14306)
Select aau.first_name "Name", po.approverstatus "Purchase Request Approver", sr.approverstatus "Service Request Approver", adef.org_name "Account" from aaauser aau
left join POApproverDetails po on po.approver=aau.user_id
left join SRApproverDetails sr on sr.APPROVER=aau.USER_ID
left join sduser su on su.userid=aau.user_id
left join accountdefinition adef on adef.pocid=su.userid where sr.APPROVERSTATUS='True' or po.APPROVERSTATUS='True' Order by 4
New to ADSelfService Plus?
Related Articles
Query to show Approved tickets per Approver (MSSQL & PGSQL)
Tested in Build PGSQL (14300) or MSSQL (14306) PGSQL & MSSQL: SELECT wo.WORKORDERID "Request ID", wo.TITLE "Subject", std.STATUSNAME "Request Status", ti.FIRST_NAME "Technician", longtodate(wo.CREATEDTIME) "Created Time", ApprovalDetails.EMAIL ...
Query to fetch the fields in the templates (MSSQL & PGSQL)
Tested in builds from PGSQL (14300) or MSSQL (14306) The query fetches all the fields with display name used across Request templates PQSQL: select Distinct (CASE when fc.field_name like 'udf_%' then ca.aliasname else fc.field_name END) "Fields", ...
Query that lists pending approval of a particular service approver (PGSQL)
Doesnt work in PGSQL (14300) ERROR: relation "workorder_threaded" does not exist SELECT wo.WORKORDERID "Request ID",aau.FIRST_NAME "Requester",wo.TITLE "Subject",ti.FIRST_NAME "Technician", longtodate(wo.CREATEDTIME) "Created Time",appsau.first_name ...
Query to get list of service request templates created with Tasks associated to it. (MSSQL & PGSQL)
Tested in builds from PGSQL (14300) or MSSQL (14306) Execute the given query below from Reports-->New query report select sd.name "Service Name", rtl.templatename "Service Template Name", rtl.comments "Template description", rtf.description ...
Query for request attachment details (MSSQL & PGSQL)
Tested in builds from PGSQL (14300) or MSSQL (14306) Requests with Attachment, its name and path SELECT ad.ORG_NAME AS "Account", wo.WORKORDERID AS "Request ID", wo.TITLE AS "Subject", ti.FIRST_NAME AS "Technician", sa.ATTACHMENTNAME "Attachment ...