Passing parameters into UD8 member

DDrider
New Contributor III

I am building a UD8 dynamic calc to bypass the limit of 4 cube view overrides. The calculation will read the referenced member (e.g. A#Net_Income:S#Actual) and return a different member intersection (A#Net_Income:S#Plan2024)

In order to return the correct plan scenario, The UD8 member must read the time parameter used in the cube view. This functionality exists, but is throwing an unexpected error. My parameter exists in the default workspace.

To pull my literal parameter value, I have the following code:

TimeParameter = "Param_Time_LitValue"

Dim TimeMbr As String = BRApi.Dashboards.Parameters.GetLiteralParameterValue(Si, False, Guid.Empty, TimeParameter)

TimeMbr returns the value "Unknown". From my research, this error occurs when you reference a parameter that is defined in a different workspace, which is not the case here.

I would appreciate advice on what I am doing wrong. The sample code I am following is found within BRAPI>Dashboards>Parameters. The sample says that the TimeParameter portion of the formula should equal "CombinedWsAndParamName As String" I cannot find a reference to this anywhere or an example of what this looks like.

1 ACCEPTED SOLUTION

Henning
Valued Contributor II

Hi,

when the time parameter in the cube view is selected, I assume this time also applies to the cell the UD8 member is used on (sounds like it here: "The UD8 member must read the time parameter used in the cube view.").

So the selected time is part of the point of view (POV) for the dynamic member. That means that you can pull the time from the POV of each cell where the calculation is executed on using in your dynamic member formula:

Dim TimeMbr as String = Api.Pov.Time.Name

This also saves you the BRApi, which is to be avoided when possible as it impacts performance when executed too many times.

 

View solution in original post

2 REPLIES 2

Henning
Valued Contributor II

Hi,

when the time parameter in the cube view is selected, I assume this time also applies to the cell the UD8 member is used on (sounds like it here: "The UD8 member must read the time parameter used in the cube view.").

So the selected time is part of the point of view (POV) for the dynamic member. That means that you can pull the time from the POV of each cell where the calculation is executed on using in your dynamic member formula:

Dim TimeMbr as String = Api.Pov.Time.Name

This also saves you the BRApi, which is to be avoided when possible as it impacts performance when executed too many times.

 

TheJonG
Contributor III

My first thought is exactly what Henning mentioned - using the api.pov.time.name. Also it is not recommended to use the GetLiteralParameter Brapi call due to it not being user specific i.e. users can override the literal parameter and get inconsistent results.

That being said, you cannot pass a parameter into a UD8 dynamic calc. However, you can use a Finance Business Rule with a FinanceFunctionType of DataCell and pass parameters there. You can replicate the UD8 logic within there. Here is an example:

Finance Rule:

TheJonG_0-1726843673971.png

Calling the BR in the Cube View:

TheJonG_1-1726843745218.png