Find screens by name

Ever struggled to find the screen called “something” in a tree of folders?
This script will give you full location of the screen with all the folders. Just change the name in the where-clause and run this against the HRNET database.

select 
	pppf.folder_name as [Folder],  
	ppf.folder_name as [Folder],  
	pf.folder_name as [Folder],  
	f.folder_name as [Folder],  
	scr_lang.SCREENNAME,
	scr_lang.DESCRIPTION,
	scr.*
from OC_SCREENS scr
	inner join OC_SCREENLANGUAGES scr_lang on scr.SCREENID = scr_lang.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 SCREENNAME like '%SOMETHING%'
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *