Forum Discussion

Oscar's avatar
Oscar
Contributor
2 days ago

Show formula of Account type DynamicCalc

Hello ...

 We are trying to output the formula for Accounts of type DynamicCalc in a cube using an U8 member named U8#AccountFormula. In this member we have defined the following:

Return api.Account.Formula(api.Pov.Account.MemberId,API.Pov.Scenario.MemberID,Api.Pov.Time.MemberId)

The code above only seems to work for all Accounts except type DynamicCalc

Is there another function we should be leveraging? Thanks

 

2 Replies

  • rhankey's avatar
    rhankey
    Contributor II

    Part of the problem is that you are passing in ScenarioId rather than the ScenarioTypeId.  Given it appears you are seeking the formula for POV Scenario & POV Time, you could simply remove both those optional pass-in parameters (only pass-in the AccountId).  Otherwise replace your second pass-in param with api.Pov.ScenarioTypeId.

    Having said that, I just tried a quick test, and the function did not return the member formula where FormulaType=DynamicCalc, until I set AccountType to something other than DynamicCalc.  I tried a couple alternate ways via the api, and getting the same results.  Not sure I've run into this before.

  • Oscar's avatar
    Oscar
    Contributor

    This is weird ... I changed the formula in U8#AccountFormula to the below to simply output the account name

    Return api.Pov.Account.Name

    The name is correctly printed in the cube view only when the account is not of type DynamicCalc.

    Unvested_Nonparticipating is of type Balance while Allocation_Pct is DynamicCalc