Skip to main content
May 13, 2025
Solved

Column suppression

  • May 13, 2025
  • 1 reply
  • 0 views

Hi,
we would like to show the periods based on on the "Number Of No Input Periods Per Workflow Unit" Scenario setting.

Suppress if "No Input"

Is that possible?
Roland Weiss  

Best answer by T_Kress

There are a couple ways you should be able to handle, like everything in OS (more than one way).  In the column header format you can use an XFBR string to return Column Visible = False based on an XFBR string of scenario and time.

Or a second way is shown below.  In this way you are figuring out which columns are Actual data vs Forecast data to show on cube views.

In both cases, an XFBR string is used.

 	If args.FunctionName.XFEqualsIgnoreCase("ActPeriods") Then
'					XFBR(XCLR_XFBRString, ActPeriods, CurrScenario = |WFScenario|, wfYear= |WFYear|)
					Dim CurrScenario As String = args.NameValuePairs.XFGetValue("CurrScenario")
					Dim wfYear As Integer = args.NameValuePairs.XFGetValue("wfYear")
					Dim wfScenarioId As Integer = ScenarioDimHelper.GetIdFromName(si, CurrScenario)
					
'					brapi.ErrorLog.LogMessage(si, "Scenario = " & CurrScenario & " Year = " & wfYear )
					
					Dim NoInputPeriods As Integer = BRApi.Finance.Scenario.GetWorkflowNumNoInputTimePeriods(si, wfScenarioId)	
'					brapi.ErrorLog.LogMessage(si, "Scenario = " & CurrScenario & " Year = " & wfYear & "  NoInputPeriods = " & NoInputPeriods)
					If NoInputPeriods <> 0 Then	
						Return "T#" & wfYear & "M" & NoInputPeriods.tostring & ".AllPriorInYearInclusive"
					Else
						Return "T#" & wfYear & ".Base"
					End If	
				End If	 

 

1 reply

T_KressAnswer
May 13, 2025

There are a couple ways you should be able to handle, like everything in OS (more than one way).  In the column header format you can use an XFBR string to return Column Visible = False based on an XFBR string of scenario and time.

Or a second way is shown below.  In this way you are figuring out which columns are Actual data vs Forecast data to show on cube views.

In both cases, an XFBR string is used.

 	If args.FunctionName.XFEqualsIgnoreCase("ActPeriods") Then
'					XFBR(XCLR_XFBRString, ActPeriods, CurrScenario = |WFScenario|, wfYear= |WFYear|)
					Dim CurrScenario As String = args.NameValuePairs.XFGetValue("CurrScenario")
					Dim wfYear As Integer = args.NameValuePairs.XFGetValue("wfYear")
					Dim wfScenarioId As Integer = ScenarioDimHelper.GetIdFromName(si, CurrScenario)
					
'					brapi.ErrorLog.LogMessage(si, "Scenario = " & CurrScenario & " Year = " & wfYear )
					
					Dim NoInputPeriods As Integer = BRApi.Finance.Scenario.GetWorkflowNumNoInputTimePeriods(si, wfScenarioId)	
'					brapi.ErrorLog.LogMessage(si, "Scenario = " & CurrScenario & " Year = " & wfYear & "  NoInputPeriods = " & NoInputPeriods)
					If NoInputPeriods <> 0 Then	
						Return "T#" & wfYear & "M" & NoInputPeriods.tostring & ".AllPriorInYearInclusive"
					Else
						Return "T#" & wfYear & ".Base"
					End If	
				End If	 

 

May 13, 2025

Brilliant, many thanks for your help!