Forum Discussion
MarcusH
14 hours agoValued Contributor
I get the security groups into a dictionary keyed by the security group id. Then I read the workflow profile tables to get the security group id information and look up the name of the security group from the dictionary. This is the SQL Query I use to get the workflow security groups:
thisSQLClause = "Select CASE WorkflowProfileAttributes.ScenarioTypeID "
thisSQLClause &= "when '-1' Then '(Default)' "
thisSQLClause &= "when '0' Then 'Actual' "
thisSQLClause &= "when '1' Then 'Budget' "
thisSQLClause &= "when '2' Then 'Flash' "
thisSQLClause &= "when '3' Then 'Forecast' "
thisSQLClause &= "when '4' Then 'FXModel' "
thisSQLClause &= "when '5' Then 'History' "
thisSQLClause &= "when '6' Then 'Model' "
thisSQLClause &= "when '7' Then 'Plan' "
thisSQLClause &= "when '8' Then 'Tax' "
thisSQLClause &= "when '9' Then 'Variance' "
thisSQLClause &= "when '10' Then 'Administration' "
thisSQLClause &= "when '11' Then 'Control' "
thisSQLClause &= "when '12' Then 'LongTerm' "
thisSQLClause &= "when '13' Then 'Operational' "
thisSQLClause &= "when '14' Then 'Sustainability' "
thisSQLClause &= "when '15' Then 'Target' "
thisSQLClause &= "when '101' Then 'ScenarioType1' "
thisSQLClause &= "when '102' Then 'ScenarioType2' "
thisSQLClause &= "when '103' Then 'ScenarioType3' "
thisSQLClause &= "when '104' Then 'ScenarioType4' "
thisSQLClause &= "when '105' Then 'ScenarioType5' "
thisSQLClause &= "when '106' Then 'ScenarioType6' "
thisSQLClause &= "when '107' Then 'ScenarioType7' "
thisSQLClause &= "when '108' Then 'ScenarioType8' END As ScenarioType, "
thisSQLClause &= "CASE AttributeIndex WHEN 1250 THEN 'Workflow Execution Group' WHEN 16100 THEN 'Certification SignOff Group' WHEN 6100 THEN 'Journal Process Group' WHEN 6200 THEN 'Journal Approval Group' WHEN 6300 THEN 'Journal Post Group' END AS Attribute, "
thisSQLClause &= "WorkflowProfileAttributes.ProfileAttributeValue, WorkflowProfileHierarchy.ProfileName "
thisSQLClause &= "From WorkflowProfileAttributes INNER Join "
thisSQLClause &= "WorkflowProfileHierarchy On WorkflowProfileAttributes.ProfileKey = WorkflowProfileHierarchy.ProfileKey "
thisSQLClause &= "Where (WorkflowProfileAttributes.AttributeIndex In (1250, 16100, 6100, 6200, 6300)) "
Related Content
- 1 year ago