02-18-2022 08:28 AM - last edited on 05-03-2023 09:19 AM by JackLacava
Account dimension member "In Use" property (Vary by Scenario Type and Time) set to Scenario Type = "Control" and Time to "2022M2", Stored value "False"
However when I try to grab the InUse value via a BR it always returns "True"
Dim varyByScenarioTypeId As Integer = ScenarioDimHelper.GetIdFromName(si, "ActCon")
Dim varyByTimeId As Integer = TimeDimHelper.GetIdFromName("2022M2")
Dim boolInUse As Boolean = BRApi.Finance.Account.InUse(si, memberId, varyByScenarioTypeId, varyByTimeId)
But works fine if I set the Scenario Type = "Actual" or "Budget". Doesn't work if Scenario Type = "Control"
Any ideas?
Solved! Go to Solution.
02-18-2022 10:02 AM - edited 02-18-2022 10:04 AM
Looks like you might be grabbing the Scenario ID instead of the ScenarioType ID. Try this for the scenario type ID:
Dim scenarioTypeId As Integer = api.Scenario.GetScenarioType(scenarioId).Id
02-18-2022 10:02 AM - edited 02-18-2022 10:04 AM
Looks like you might be grabbing the Scenario ID instead of the ScenarioType ID. Try this for the scenario type ID:
Dim scenarioTypeId As Integer = api.Scenario.GetScenarioType(scenarioId).Id
02-18-2022 11:05 AM
Thanks Eric. Works perfect. I was using the ScenarioID rather than ScenarioTypeId.
Best
Sai