Forum Discussion
It would probably be easier to have an XFBR that simply accepts one parameter (the account name) and returns the necessary property. Then you should be able to use it like this on the CV properties: XFBR(MyRule,MyFunction,AccName=|MFAccount|). This would avoid having to mess with args, which might not be set in the way you seem to expect.
If it's about formatting, anyway, you can write a Cube View Extender rule; that has access to the cell, so you can retrieve the Account from there.
Hi, I tried this approach, however, |MFAccount| does not seem to be recognized by the XFBR rule. When I put the actual Account Name in it works fine but Account=|MFAccount| does not. Any ideas?
If args.FunctionName.XFEqualsIgnoreCase("GetAccountFormatFromText8") Then
Dim ScenID As Integer = DimConstants.Unknown
Dim TimeID As Integer = DimConstants.Unknown
Dim accountName As String = args.NameValuePairs.XFGetValue("Account")
Dim accountId As Integer = BRapi.Finance.Members.GetMemberId(si,DimType.Account.Id,accountName)
Dim FormatParam As String = BRApi.Finance.Account.Text(si,accountID, 8,ScenID,TimeID)
BRApi.ErrorLog.LogMessage(si, $"accountName: " & accountName)
BRApi.ErrorLog.LogMessage(si, $"FormatParam: " & FormatParam)
Return FormatParam
End If
thanks,
Greg
- JackLacava3 years agoHonored Contributor
I guess it depends on whether that column or rows actually uses a filter on Accounts. MF is for "member filter", and it's supposed to retrieve the member where a filter is specified. E.g. if you have a row defined with "A#BalanceSheet.Base", MFAccount will be populated by the actual Account on expansion, i.e. A#MyNiceAssed, A#MyBadLiability etc etc; but if that row expands on something else, e.g. E#Total.Base, MFAccount won't be populated. If that principle doesn't hold true, it should be reported; at which point, the only option becomes a CV Extender.
- GregHertling3 years agoNew Contributor III
Hi, it does not work. My rows are only accounts, and I am using a member filter on Account. A#AssetGlobalsSpecs_EV.Base
Typing the member in works:
XFBR(Format_Helper, GetAccountFormatFromText8, Account=NumberOfChargers_EV)
This does not work:
XFBR(Format_Helper, GetAccountFormatFromText8, Account=|MFAccount|)
How can I use a CV Extender? I thought they only worked on reports?
thanks again,
Greg
Related Content
- 10 months ago
- 6 months ago
- 3 years ago
- 11 months ago