Skip to main content
Newcomer
Oct 26, 2022 11:30 AM UTC
Solved

Scenario dimension Text1 into a time string

I use an xfbr in my CV based on rules.

In the scenario dimension we have put text into the Custom Settings (Text1). What is the syntax to get the Scenario Text1 into the case string (Bold)? Also is it possible to incorporate this into the time frame with :Name(etc...xx).

If args.FunctionName.XFEqualsIgnoreCase("GetSCenario") Then

                                                          Dim curScenario As String= args.NameValuePairs.XFGetValue("curScenario")

                                                           Dim curMonth As String = Right(CurScenario,2)

                                                           Dim QuartersFC As String = String.Empty

                                                           Dim ScenarioText1 As String = api.scenario.text(api.pov.scenario.Attribute= Text1)                                                   

                                                           'Dim mbr As Member = args.SubstVarSourceInfo.WFScenario.property=Text1

 

                                                           'Quarters Act

                                                                       Select Case CurMonth

                                                                                   Case "06"

                                                                                               QuartersFC = "T#|WFYear|Q1 :name(Q1 & "ScenarioText1")    ,T#|WFYear|Q2:name(Q2 & "ScenarioText1")

 

End select

Return QuartersFC

Employee - Mentor
Oct 26, 2022 3:33 PM UTC

Dim scenarioId As Integer = BRApi.Finance.Members.GetMemberId(si, DimType.Scenario.Id, curScenario)
Dim scenarioText1 As String = brapi.Finance.Scenario.Text(si, scenarioId, 1)

2 replies

Employee - Mentor
Oct 26, 2022 3:33 PM UTC

Dim scenarioId As Integer = BRApi.Finance.Members.GetMemberId(si, DimType.Scenario.Id, curScenario)
Dim scenarioText1 As String = brapi.Finance.Scenario.Text(si, scenarioId, 1)

BK6Author
Newcomer
Oct 27, 2022 7:28 AM UTC

ah no attribute. Spot on it works like charm!