Query to display additional field associations with templates (MSSQL)

Query to display additional field associations with templates (MSSQL)

Tested in build MSSQL (14306)


Use case

The reports shows in which templates the created additional fields are associated 

Query

select sd.name "Service Catalog Name",
           rt.templatename "Template name",
           fc.field_name "Fields" from requesttemplate_list rt
left join servicedefinition sd on sd.serviceid = rt.parent_service
left join form_customizer fc on fc.form_name = ('WorkOrder_' + rt.templatename)
where fc.index_tech >= 0 and fc.field_name='udf_sline_901'
order by 1

Go to Admin >> Service Catalog - Additional Fields/Incident - Additional Fields >> Note the API name for the additional field and replace it with the highlighted text in the query




Sample Table



                  New to ADSelfService Plus?