-- List Status Dependency exceptions for a Request Type
spool c:\request_field_dependency_exceptions_yyyymmdd.txt
set linesize 1000
select crt.request_type_name "Request Type",
ww.workflow_name,
wws.sort_order "Step#",
wws.step_name,
ns.section_name,
npsf.prompt,
cs.status_name,
cfd.visible_field_flag "Visible",
cfd.disabled_field_flag "Editable",
cfd.required_field_flag "Required",
cfd.reconfirm_field_flag "Reconfirm",
cfd.clear_field_flag "Clear" --,
--npsf.parameter_token
from KCRT_REQUEST_TYPES crt,
KCRT_REQUEST_TYPE_STATUSES crts,
KCRT_STATUSES cs,
KCRT_FIELD_DEPENDENCIES cfd,
KNTA_PARAMETER_SET_FIELDS npsf,
KNTA_SECTION_LAYOUTS nsl,
KNTA_SECTIONS ns,
KWFL_WORKFLOWS ww,
KWFL_WORKFLOW_STEPS wws
where
-- limit to a single request type. Comment out to list all request types
crt.request_type_name = 'My Request Type Name'
-- limit to a single workflow. Comment out to list all workflows
and ww.workflow_name = 'My Workflow'
and ww.workflow_id = wws.workflow_id
and crts.status_id = wws.parent_status
and wws.step_type_code = 'APPROVAL'
and wws.product_scope_code = 'RI'
and crt.request_type_id = crts.request_type_id
and crts.status_id = cs.status_id
and crts.request_type_status_id = cfd.request_type_status_id
and cfd.parameter_set_field_id = npsf.parameter_set_field_id
and npsf.section_id = nsl.section_id
and nsl.entity_primary_key = crt.request_type_id
and nsl.section_id = ns.section_id
and cfd.visible_field_flag = 'Y'
-- list exceptions to the norm (field is editable with no special constraints).
and ( cfd.disabled_field_flag = 'N' -- Y=IsEditable N= NotEditable
or cfd.required_field_flag = 'Y'
or cfd.reconfirm_field_flag = 'Y'
or cfd.clear_field_flag = 'Y'
)
order by cfd.disabled_field_flag desc, cfd.required_field_flag,
cfd.reconfirm_field_flag, cfd.clear_field_flag,
wws.sort_order, ns.section_name, npsf.prompt
|