Forum Discussion
If you're doing a Dynamic Calc, what you could do is actually using a custom GetDataCell function. This way, you don't need to worry about resolving expansions yourself - you just pass the variables you need as arguments.
This is a woefully undocumented corner of the platform, but it's actually quite cool. In a Finance BR (called "MyFinanceBR" in this case), use the relevant FinanceFunctionType block:
Case Is = FinanceFunctionType.DataCell
If args.DataCellArgs.FunctionName.XFEqualsIgnoreCase("MyFunction") Then
api.LogMessage(args.DataCellArgs.NameValuePairs.Keys(0))
api.LogMessage(args.DataCellArgs.NameValuePairs.Values(0))
Return 1
End If
Then in your CubeView, use the expanded syntax (sadly it doesn't seem to work with the condensed one)
Result:
note how I had to put square brackets around my variable, that's because otherwise spaces and special chars will wreak havoc on the expansion.
In terms of performance, I *think* this strategy might be a bit faster than opening db connections in XFBRs, but I could be wildly wrong.
Thanks! But with a data cell BR you wouldn't be able to return a text value right, it only returns numeric values?
I was hoping to dynamically determine the text value that the cell would return based on the cvname for example.
- JackLacava2 years agoHonored Contributor
Depends on the View member. Annotation-type views (Annotation, Footnote, etc) support text, so as long as you set the row or column to that you can return text.
Related Content
- 2 years ago
- 3 years ago
- 2 years ago