Forum Discussion

NicolasArgente's avatar
NicolasArgente
Valued Contributor
2 years ago

More info on ExtractDashboardsXml

Hello Team,
I am trying to extract Dashboard specific items using the ExtractDashboardsXml.
I can only make it work when I use the Options ExtractAllItems = True.
I am running OS 7.4.2
I can not find any information on this formula. I would like to have an example on how we should the extractItems. Can you please provide an example? Especially on what is expected in the extractItems.

ExtractDashboardsXml(_
    ByVal si As SessionInfo, _
    ByVal isSystemLevel As Boolean, _
    ByVal options As XmlExtractOptions, _
    ByVal extractItems As Dictionary(Of XmlExtractItemPk, Boolean) _
)

 


Thanks!

3 Replies

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

     It seems that the ID of XmlExtractItemType is not consistent

    You probably already know this, just to be sure: The number changes in an enum are normal across versions of a product as new items are added and moved around in the enum.  As a matter of style, always use the name value of the enum and never the number.  The enum itself is the contract between functionality and description.

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

    Hi Nicolas,

    I wrote something using this once but cannot find it and remember giving up on it.  Here is what I know about the extractItems:

    The Key field is an XmlExtractItemPk that consists of an enum value of type XmlExtractItemType.DashboardComponents and the dashboard Maintenance Unit GUID 

    The maintenance unit guids are in the repo.

    Dictionary<XmlExtractItemPk, Guid> dict= new Dictionary<XmlExtractItemPk, Guid>();
    dict.add(new XmlExtractItemPk(XmlExtractItemType.DashboardComponents, gGuid), true);

    I think I experimented with using things other than XmlExtractItemType.DashboardComponents:

    public enum XmlExtractItemType 
    {
    Unknown = -1,
    All = 0,
    Groups = 1,
    Group = 2,
    Profiles = 3,
    Profile = 4,
    CubeView = 5,
    DashboardWorkspaces = 6,
    DashboardWorkspace = 7,
    DashboardMaintUnits = 8,
    DashboardMaintUnit = 9,
    Dashboards = 10,
    Dashboard = 11,
    DashboardComponents = 12,
    DashboardComponent = 13,
    DashboardAdapters = 14,
    DashboardAdapter = 15,
    DashboardParameters = 16,
    DashboardParameter = 17,
    DashboardFileResources = 18,
    DashboardFileResource = 19,
    DashboardStringResources = 20,
    DashboardStringResource = 21,
    WorkspaceAssemblies = 22,
    WorkspaceAssembly = 23,
    DataManagementSteps = 24,
    DataManagementStep = 25,
    DataManagementSequences = 26,
    DataManagementSequence = 27,
    DataSources = 28,
    DataSource = 29,
    Author = 30,
    BusinessRules = 31,
    ConditionalRuleBusinessRules = 32,
    DerivativeRuleBusinessRules = 33,
    ParserBusinessRules = 34,
    ConnectorBusinessRules = 35,
    BusinessRule = 36,
    FormTemplate = 37,
    AllFxRateTypes = 38,
    FxRateType = 39,
    AllScenarioTypes = 40,
    ScenarioType = 41,
    AllTimePeriods = 42,
    AllTimePeriodsForYear = 43,
    TimePeriod = 44,
    JournalTemplate = 45,
    TimeDimProfiles = 46,
    TimeDimProfile = 47,
    Dimensions = 48,
    Dimension = 49,
    Cubes = 50,
    Cube = 51,
    SystemRoles = 52,
    Users = 53,
    User = 54,
    SecurityGroups = 55,
    SecurityGroup = 56,
    ExclusionGroups = 57,
    ExclusionGroup = 58,
    WorkflowProfiles = 59,
    WorkflowProfile = 60,
    WorkflowProfileTemplates = 61,
    WorkflowProfileTemplate = 62,
    TaskScheduler = 63,
    }

     



     

  • NicolasArgente's avatar
    NicolasArgente
    Valued Contributor

    Thanks! It seems that the ID of XmlExtractItemType is not consistent. For example in my world, TaskScheduler = 59 and not 63.
    I will look into all this in more detail.
    Thanks RobbSalzmann 

    If anyone as a BR working with that to share, that would be appreciated.