As a follow-up from yesterday post about finding workflows that change field in a table, today I needed to find all the screens that contain particular field from a table.
Here is the SQL query:
select pppf.folder_name as [Folder], ppf.folder_name as [Folder], pf.folder_name as [Folder], f.folder_name as [Folder], scrname.screenname from OC_SCREENCONTROLS ctrl inner join OC_SCREENLANGUAGES scrname on scrname.screenid=ctrl.screenid inner join OC_SCREENS scr on scr.screenid=ctrl.screenid left join OC_ADMINCONSOLE_FOLDERS f on scr.folderid = f.folder_id left join OC_ADMINCONSOLE_FOLDERS pf on f.parent_id = pf.folder_id left join OC_ADMINCONSOLE_FOLDERS ppf on pf.parent_id = ppf.folder_id left join OC_ADMINCONSOLE_FOLDERS pppf on ppf.parent_id = pppf.folder_id where ctrl.tablename = 'JOBDETAIL' and ctrl.fieldname = 'PRINCIPALJOB'