Find all workflows that use a picklist, by picklist name

One of my readers did ask if there is a way to find all the workflows that use a particular picklist.
A little bit of digging and here you go:

select 
    pppf.folder_name as [Folder],
    ppf.folder_name as [Folder],
    pf.folder_name as [Folder],
    f.folder_name as [Folder],
    w.WORKFLOWNAME, 
    pl.SHORTDESCRIPTION as PicklistName 
from OC_WORKFLOWS w
	inner join OC_SCREENS s on w.SCREENID = s.SCREENID
	inner join OC_SCREENCONTROLS sc on s.SCREENID = sc.SCREENID
	inner join OC_PICKLISTS p on p.PICKLISTID = sc.WORKFLOWPICKLISTID
	inner join OC_PICKLISTLANGUAGES pl on pl.PICKLISTID = p.PICKLISTID
	left join OC_ADMINCONSOLE_FOLDERS f on w.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 pl.SHORTDESCRIPTION = 'Picklist Name'
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 *