Forum Discussion
dsebenaler
23 days agoNew Contributor III
You might consider doing this via dynamic calc member instead. There is a 'annotations consolidation' snippet example available to build from. The example is a UD8 member but you could create a dynamic calc member in a different UD dim.
'Cube View definition
'Row Definition: E#[Total GolfStream].tree
'Col1 Definition: V#Annotation:Name("Comment")
'Col2 Definition: V#Annotation:UD8#DynamicTextCons:Name("Consolidated")
'UD8 Member setup
'Name: DynamicTextCons <-- If this is changed it must be updated in the CV Col2 definition above.
'Formula Type: DynamicCalc
'Allow Input: True
'Is Consolidated: False
'In Use: True
'Assign the formula below to the UD8 member to show the consolidated text
Dim iEntityID As Integer = api.pov.Entity.MemberId
Dim iETestID As Integer
Dim strETestName As String = string.empty
Dim eTest As Member
Dim sSave As String = string.empty
Dim sSource As String = string.empty
If api.View.IsAnnotationType Then
If api.Entity.HasChildren() Then
For Each etest In api.Members.GetDescendents(api.Dimensions.GetBaseDim(dimtypeid.Entity).DimPk, iEntityID)
iETestID = etest.MemberId
sSource = api.Data.GetDataCellEx("U8#None:E#[" & etest.Name & "]:C#" & api.Entity.GetLocalCurrency(iETestID).Name).DataCellAnnotation
If Not sSource.Equals(String.Empty) Then
sSave = sSave.Trim & "; " & eTest.Name & ": " & sSource
End If
Next
Else
sSource = api.Data.GetDataCellEx("U8#None:E#[" & api.pov.entity.Name & "]").DataCellAnnotation
If Not sSource.Equals(String.Empty) Then
sSave = ";" & sSource
End If
End If
End If
If Not sSave.Equals(String.Empty) Then
Return right(sSave, len(sSave)-1).Trim
Else
Return Nothing
End If
Related Content
- 2 years ago
- 1 year ago
- 3 years ago
- 2 years ago