12-09-2022 11:01 AM - last edited on 05-23-2023 10:51 AM by JackLacava
Hello All,
I am trying to use the Global Time to pull reporting columns using the UD8 dimensionality but the values will not return.
Dim ScenarioMth As String = api.Pov.Scenario.Name
Dim gbTimeName As String = BRApi.Workflow.General.GetGlobalTime(si)
Dim objTimeMemberSubComponents As TimeMemberSubComponents = BRApi.Finance.Time.GetSubComponentsFromName(si, gbTimeName)
Dim gbMonth As String = objTimeMemberSubComponents.Month.ToString
If gbMonth.Length < 2 Then
gbMonth = "0" & gbMonth
End If
Select Case gbMonth
Case 1
If ScenarioMth = "FCST" Then
Return api.Data.GetDataCell("U8#None")
Else
Return api.Data.GetDataCell("S#FCST12:U8#None")
End If
End Select
12-09-2022 11:13 AM
Figured it out thank you all
12-12-2022 09:50 AM
Hi Dan, Can you post the information about the issue with the script and how'd you addressed?
03-27-2023 12:21 PM
Dim ScenarioMth As String = api.Pov.Scenario.Name
Dim gbTimeName As String = BRApi.Workflow.General.GetGlobalTime(si)
Dim objTimeMemberSubComponents As TimeMemberSubComponents = BRApi.Finance.Time.GetSubComponentsFromName(si, gbTimeName)
Dim gbMonth As String = objTimeMemberSubComponents.Month.ToString
'Dim gbMonthCur As Integer = gbMonth
If gbMonth.Length < 2 Then
gbMonth = "0" & gbMonth
End If
Select Case gbMonth
Case 11
'January
If ScenarioMth = "FCST12" Then
Return api.Data.GetDataCell("U8#None")
' Return "01"
Else
Return api.Data.GetDataCell("S#FCST01:U8#None")
' Return "02"
End If
Return "03"
End Select
Return gbMonth
03-27-2023 12:22 PM
Above is the values I wanted to return but went a different route.