Cube Attribute Information

Sweez
New Contributor III

So this seems like it should be easy, and still may be, but it has me stumpt.  If I know the name of a cube, say "Houston" from Golftream, how can I determine within a business rule what Attribute and Value dimensions that cube has active for its various scenario types?  So in this example, for the Actual sceanrio type, Houston only has Attribute1 active with an alias of "InvoiceNo".  I can not figure out where to find this information.  I looked at both the Cube and CubeInfo classes but nothing jumps out at me.  It seems like CubeInfo has everything else but this information so maybe it is there but just not sure what property is is buried in.  Has anyone had to get this information for a business rule before?

1 ACCEPTED SOLUTION

Sweez
New Contributor III

I wanted to update the post because after tones of digging I found how to get this information and want to share in case others ever need the same information.  Below is code that will get the attribute information in the example I used above.  When run it will log the following string "DimensionStageName=A1; DimensionFinanceName=InvoiceNo; Enabled=True"

 

Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
Dim dimIntegrationInfoList As List(Of IntegrationMapInfo) = IntegrationMap.GetActiveAttributeDimensions(dbConnApp, "Houston", 0)
Dim logString As New Text.StringBuilder
 
For Each dimIntegrationInfo As IntegrationMapInfo In dimIntegrationInfoList
logString.Append($"DimensionStageName={dimIntegrationInfo.DimensionStageName}; DimensionFinanceName={dimIntegrationInfo.DimensionFinanceName}; Enabled={dimIntegrationInfo.Enabled}")
Next
 
brapi.ErrorLog.LogMessage(si, logString.ToString)
End Using

View solution in original post

1 REPLY 1

Sweez
New Contributor III

I wanted to update the post because after tones of digging I found how to get this information and want to share in case others ever need the same information.  Below is code that will get the attribute information in the example I used above.  When run it will log the following string "DimensionStageName=A1; DimensionFinanceName=InvoiceNo; Enabled=True"

 

Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
Dim dimIntegrationInfoList As List(Of IntegrationMapInfo) = IntegrationMap.GetActiveAttributeDimensions(dbConnApp, "Houston", 0)
Dim logString As New Text.StringBuilder
 
For Each dimIntegrationInfo As IntegrationMapInfo In dimIntegrationInfoList
logString.Append($"DimensionStageName={dimIntegrationInfo.DimensionStageName}; DimensionFinanceName={dimIntegrationInfo.DimensionFinanceName}; Enabled={dimIntegrationInfo.Enabled}")
Next
 
brapi.ErrorLog.LogMessage(si, logString.ToString)
End Using