Forum Discussion
aricgresko
Contributor III
Here's the formula on the ScaledThousands UD8 member in my original screen shot
If viewMember.IsAnnotationType = False Then
If api.Members.HasChildren(objTimeDimPk, api.Pov.Time.MemberID) And api.Data.GetDataCell("U8#None").CellStatus.IsRealOrDerivedData = True And objAccountType <> AccountType.Flow And objAccountType <> AccountType.Balance And objAccountType <> AccountType.DynamicCalc And objAccountType <> AccountType.BalanceRecurring Then
Return api.Data.GetDataCell("(U8#None) /1000").CellAmount
Else
Dim currTime As String = api.Pov.Time.Name
Dim currTimeID As Integer = api.Pov.Time.MemberId
Dim currPeriod As Integer = api.Time.GetPeriodNumFromId(currTimeID)
Dim currYear As Integer = api.Time.GetYearFromId(currTimeID)
Dim globalTime As String = BRApi.Workflow.General.GetGlobalTime(si)
Dim globalTimeID As Integer = api.Time.GetIdFromName(globalTime)
Dim globalPeriod As Integer = api.Time.GetPeriodNumFromId(globalTimeID)
Dim globalYear As Integer = api.Time.GetYearFromId(globalTimeID)
If currYear = globalYear And currPeriod > globalPeriod Then
If api.Data.GetDataCell("U8#None").CellStatus.IsDerivedData = False Then
If api.Data.GetDataCell("U8#None").CellStatus.IsNoData = False Then
If (objAccountType <> AccountType.Flow And objAccountType <> AccountType.Balance And objAccountType <> AccountType.DynamicCalc And objAccountType <> AccountType.BalanceRecurring) Then
Return api.Data.GetDataCell("(U8#None) /1000").CellAmount
Else
Return api.Data.GetDataCell("U8#None")
End If
Else
Return Nothing
End If
End If
Else
If api.Data.GetDataCell("U8#None").CellStatus.IsNoData = False Then
If (objAccountType <> AccountType.Flow And objAccountType <> AccountType.Balance And objAccountType <> AccountType.DynamicCalc And objAccountType <> AccountType.BalanceRecurring) Then
Return api.Data.GetDataCell("(U8#None) /1000").CellAmount
Else
Return api.Data.GetDataCell("U8#None")
End If
Else
Return Nothing
End If
End If
End If
Else
Return Nothing
End If
MarkHoughton
3 years agoContributor
Hi aricgresko,
I think some declarations are missing as it's not compiling correctly. I have added these
Dim MemberId As Integer
Dim objViewMember As ViewMember = ViewMember.GetItem(api.Pov.View.MemberId)
Dim objAccountType = api.Account.GetAccountType(MemberId)
But am not sure of the declaration necessary for
objTimeDimPk
Can you see if there is any additional code to that which you posted above.
Regards
Mark
Related Content
- 11 months ago
- 31 days ago
- 3 years ago
- 3 months ago