Find workflows that change particular table field

Today my task was to find out what workflows are changing particular field within particular table. I could go through all the workflows and all the data-writers and check. But I have hundreds to choose from, I’ll spend all day trying to do it. And there will be no guarantee that I find them all and not missed anything.

For that task I came up with SQL request that shows you all the workflows, and even folder structure where to find them.

Here you go:

select 
  pppf.folder_name as [Folder],
  ppf.folder_name as [Folder],
  pf.folder_name as [Folder],
  f.folder_name as [Folder],
  flow.workflowname,
  flow.description,
  flow.allowstart
from OC_WORKFLOWDATAWRITERFIELDS fields
  inner join OC_WORKFLOWS flow on fields.workflowid = flow.workflowid
  left join OC_ADMINCONSOLE_FOLDERS f on flow.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 
  fields.tablename = 'JOBDETAIL' 
  and fields.fieldname = 'PRINCIPALJOB'
order by flow.workflowname

Obviously you’ll need to replace FIELDNAME and TABLENAME to required to you. I’m sure there would be a better way to find out folder structure, but for this purposes this will be as good as any: quick and dirty.

This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

One Response to Find workflows that change particular table field

  1. Pingback: Find screens that edit particular field in a table | Vizual HR.Net Development: Tips, Tricks and Work-Arounds

Leave a Reply

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