Lost a picklist? Find it with a query

Many times over I did spend a lot of time looking for a particular picklist. I know the name, but have no idea what folder it is in. And if you have more than just a few of them, it is sometimes impossible to find what you are looking for without help. Here is how you find a picklist by a name:

  pppf.folder_name as [Folder],
  ppf.folder_name as [Folder],
  pf.folder_name as [Folder],
  f.folder_name as [Folder],
from OC_PICKLISTS pick
	inner join OC_PICKLISTLANGUAGES pickLang on pick.PICKLISTID = pickLang.PICKLISTID
  left join OC_ADMINCONSOLE_FOLDERS f on pick.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 pickLang.SHORTDESCRIPTION = 'Picklist Name'
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

3 Responses to Lost a picklist? Find it with a query

  1. Rimke says:

    Is it possible to find all workflows where a certain picklist is used via an sql query?

    Thanks in advance!

Leave a Reply

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