Forum Discussion
NickKroppe
3 years agoContributor
As Christian mentioned, you can use this to execute a BRApi against other applications that exist within the same environment by retrieving another application's session info. A powerful use case I've seen is to create a UD8 dynamic calc that enables you to pull cube data from another app into a cube view so that you can report on and compare data in multiple OneStream apps that live in the same environment. Below is an example of a UD8 calc that can enable you to accomplish this.
'define the other application name you wish to connect to - this must be an app that lives within the same environment
'the user must also have access to the application to authenticate to it
Dim otherAppName As String = "SomeOtherApp"
'create the session info to the other app and store it globally in memory
Dim otherAppSeshInfo As SessionInfo = globals.GetObject("OtherAppSeshInfo")
If (otherAppSeshInfo Is Nothing) Then
otherAppSeshInfo = BRApi.Security.Authorization.CreateSessionInfoForAnotherApp(si, otherAppName, OpenAppResult.Success)
globals.SetObject("OtherAppSeshInfo", otherAppSeshInfo)
End If
'get the POV intersection from the CV and swap out the UD8 none member with the name of this UD8 reporting member
Dim povMemberScript As String = api.Data.CreateMemberScriptBuilder(True, True, True, True).GetMemberScript().Replace("U8#GetDataFromAnotherApp", "U8#None")
'return the POV cell amount from the other application
Return BRApi.Finance.Data.GetDataCellUsingMemberScript(otherAppSeshInfo, api.Pov.Cube.Name, povMemberScript).DataCellEx.DataCell.CellAmount
Regards,
Nick Kroppe
- Koemets3 years agoContributor
That is very cool!
Related Content
- 3 months ago
- 8 months ago