Query to get list of template name, rule name, event, conditions and actions information

Query to get list of template name, rule name, event, conditions and actions information

Version : 13000
DB : PGSQL

OUTPUT:




SELECT rd.rulename "Rule Name",
 rd.usertype "Applies To",
 rd.jscode "Script",
 ry.ruletype "Event",
rff.fieldname"Field Condition",
rcm.condition_string "Condition",
rcfv.fieldvalue "field value",
raty.actionname "Action Name",
rff1.fieldname "Field Name in action",
rafmap.fieldvalue "Field Value in Action",
 rtf.templatename "Template Name" FROM ruledata rd
LEFT JOIN RuleEventTypes ry ON ry.ruletypeid=rd.ruletypeid
LEFT JOIN RULETEMPLATESMAP rtm on rd.ruleid=rtm.ruleid
LEFT JOIN requesttemplate_list rtf ON rtf.templateid=rtm.templateid
left join RuleCriteriaMap rcm on rd.ruleid=rcm.ruleid
LEFT JOIN RuleFormField rff ON rcm.fieldid=rff.fieldid
left join RuleActionsMap ramap on rd.ruleid=ramap.ruleid
left join ruleactionfieldsmap rafmap on ramap.ruleactionid=rafmap.ruleactionid
LEFT JOIN RuleFormField rff1 ON rafmap.fieldid=rff1.fieldid
left join ruleactiontypes raty on ramap.ruleactiontypeid=raty.ruleactiontypeid
left join RuleCriteriaFieldValues rcfv on rcm.rulecriteriaid= rcfv.rulecriteriaid where rd.usertype = 'all_users'
order by 7

                New to ADSelfService Plus?