Forum Discussion

VENKAB05's avatar
VENKAB05
New Contributor III
7 months ago

XFBR in Literal Parameter is not returning value as expected

Hello Everyone,

I need a Literal parameter which will dynamically calculate something like the prior forecast based on another parameter so i ended up writing an XFBR for that Literal parameter, something like below

XFBR(HelperRule,GetPriorForecast).

And now i need this Prior Forecast value for some Finance calculations. So I tried to retrieve the value of Parameter in the finance rule by using 

BRApi.Dashboards.Parameters.GetLiteralParameterValue

But it returns the same "XFBR (Helper Rule, Get Prior Forecast)" rather than the Actual String Value.

Strangely enough, if i use the same XFBR for Scenario Filter in a DM step, it picks up the proper string value.

Curious Why would it not work when I try to retrieve its value in a finance BR?

  • sudarshan's avatar
    sudarshan
    New Contributor III

    Isn't this the expected behaviour? You are essentially trying to call or trigger an xfbr function inside a business rule. Whereas it correctly invokes the XFBR before running any action like a DM step.

    You could perhaps directly call that function by using the referenced assembly.

    • VENKAB05's avatar
      VENKAB05
      New Contributor III

      Thanks sudarshan,

      I was under the impression that i was doing something different and wanted to clarify. 

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

    You can call the XFBR directly from the rule where you need the Prior Forecast value.  The Literal Parameter step is an extra, unnecessary step.