cancel
Showing results for 
Search instead for 
Did you mean: 
Accepted Code Samples
OneStream approved sample code snippets and examples to help everyone write rules.

Knowledge Base Articles

Extender: Rename a dimension

Rename a dimension '>>>>>>>>>>>>>>CAUTION<<<<<<<<<<<<<<<< 'BRApi.Finance.Dim.GetDimPk 'This API does not make entries into the Audit tables and will not be reflected in the Audit Metadata Report Dim originalDim As String = String.Empty '<-- Dimension...

OSAdmin by Community Manager
  • 30 Views
  • 0 comments
  • 0 kudos

Extender: Auto Update Member Property

Update Text1 value for Account member '>>>>>>>>>>>>>>CAUTION<<<<<<<<<<<<<<<< 'BRApi.Finance.MemberAdmin.SaveMemberInfo 'This API does not make entries into the Audit tables and will not be reflected in the Audit Metadata Report 'Recommended usage of ...

OSAdmin by Community Manager
  • 34 Views
  • 0 comments
  • 0 kudos

Extender: Auto Create Member

Create a new account member '>>>>>>>>>>>>>>CAUTION<<<<<<<<<<<<<<<< 'BRApi.Finance.MemberAdmin.SaveMemberInfo 'This API does not make entries into the Audit tables and will not be reflected in the Audit Metadata Report 'Recommended usage of this API d...

OSAdmin by Community Manager
  • 47 Views
  • 0 comments
  • 0 kudos

Extender: Export Metadata via Extender

To be used with an Extender rule to export the metadata zip file from the application Select Case args.FunctionType Case Is = ExtenderFunctionType.Unknown, ExtenderFunctionType.ExecuteDataMgmtBusinessRuleStep 'Prepare the Stage Data Extract File path...

OSAdmin by Community Manager
  • 42 Views
  • 0 comments
  • 0 kudos

Extender: Export Data from Stage via Extender

To be used with an Extender rule to export data from the stage for a Workflow Profile Select Case args.FunctionType Case Is = ExtenderFunctionType.Unknown, ExtenderFunctionType.ExecuteDataMgmtBusinessRuleStep 'Prepare the Stage Data Extract File path...

OSAdmin by Community Manager
  • 40 Views
  • 0 comments
  • 0 kudos

Extender: User Inactivity Email

Automate sending of emails prior to user expiration. Imports System Imports System.Data Imports System.Data.Common Imports System.IO Imports System.Collections.Generic Imports System.Globalization Imports System.Linq Imports Microsoft.VisualBasic Imp...

OSAdmin by Community Manager
  • 34 Views
  • 0 comments
  • 0 kudos

Extender: Automate Import, Validate, Load

Used in a rule to automate batch import, validate and load, most likely in an Extender or Event Handler 'Set Processing Switches Dim valTransform As Boolean = True Dim valIntersect As Boolean = True Dim loadCube As Boolean = True Dim processCube As B...

OSAdmin by Community Manager
  • 36 Views
  • 0 comments
  • 1 kudos

Extender: Automate Application Metadata Backup

Extender buiness rule that all application metadata to a zip file for the current application. The files are written to the application Data Mgmt Export folder in the file share directory. 'Prepare the Stage Data Extract File path Dim configSettings ...

OSAdmin by Community Manager
  • 42 Views
  • 0 comments
  • 1 kudos

Dashboard: Save Literal Parameter

Set Literal Parameter Value Dim parameterName As String = "LiteralParameterName" Dim newValue As String = "NewLiteralValue" 'Set literal parameter BRApi.Dashboards.Parameters.SetLiteralParameterValue(si, False, parameterName, newValue)

OSAdmin by Community Manager
  • 48 Views
  • 0 comments
  • 0 kudos

Dashboard: Open Dashboard File Resource

Open Dashboard file resource & get its contents 'Define File Name Dim fileResourceName As string = "FileName.txt" '<- Enter file name to get from Dashboard 'Get the FileResource Dim fileResource As DashboardFileResource = BRApi.Dashboards.FileResourc...

OSAdmin by Community Manager
  • 43 Views
  • 0 comments
  • 1 kudos

Dashboard: Get Literal Parameter

Retrieve value stored in literal paramater Dim parameterName As String = "LiteralParameterName" Dim parameterValue As String = "" 'Set literal parameter parameterValue = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, parameterName)

OSAdmin by Community Manager
  • 41 Views
  • 0 comments
  • 1 kudos

Dashboard: XFBR String

Business rules written and used as Parameters that return a specific value based on the defined inputs. This Business Rule can be applied to any Dashboard or Cube View property where a Parameter is used. Imports System Imports System.Data Imports Sys...

OSAdmin by Community Manager
  • 74 Views
  • 0 comments
  • 0 kudos

Dashboard: Data Sets

DashboardDataSet Rules are used to create programmatic query results. This rule type enables the rule writer to combine multiple types of data into a single result set using the full syntax capability of VB.Net. '-------------------------------------...

OSAdmin by Community Manager
  • 69 Views
  • 0 comments
  • 0 kudos

Finance: Daily Revenue

An account that calculates Daily Revenue by taking three months of Total Revenue and dividing it down to a daily amount 'Calculate Daily Revenue 'Get Text1 priority from current Scenario to learn which Scenario to copy prior data from Dim priorScenar...

OSAdmin by Community Manager
  • 24 Views
  • 0 comments
  • 0 kudos

Finance: Annualized Revenue

An account that calculates Annualized Revenue by taking three months of Total Revenue and dividing it down to a monthly amount then multiplying by 12 'Calculate Annualized Revenue Return api.data.GetDataCell("(A#TOTREV:I#Top:U1#Top:V#Trailing3MonthTo...

OSAdmin by Community Manager
  • 31 Views
  • 0 comments
  • 0 kudos

Finance: Returned on Capital Employed

Efficiency Measure: A financial ratio that measures a company's profitability and the efficiency with which its capital is employed. Formula: EBIT/ (Total Assets- Total Liabilities) 'Calculate Return on Capital Employed 'Formula: EBIT/ (Total Assets-...

OSAdmin by Community Manager
  • 18 Views
  • 0 comments
  • 0 kudos

Finance: Return on Total Assets

Efficiency Measure: The ratio is considered an indicator of how effectively a company is using its assets to generate earnings before contractual obligations must be paid. Formula: EBIT / Total Net Assets 'Calculate Return on Total Assets 'Formula: E...

OSAdmin by Community Manager
  • 7 Views
  • 0 comments
  • 0 kudos

Finance: Return on Equity

Efficiency Measure: Return on equity measures a corporation's profitability by revealing how much profit a company generates with the money shareholders have invested. Formula: ROE= Net Inocme/ Average Shareholders Equity 'Calculate Return on Equity ...

OSAdmin by Community Manager
  • 40 Views
  • 0 comments
  • 0 kudos

Finance: Return on Assets

Efficiency Measure: An indicator of how profitable a company is relative to its total assets. It gives an idea as to how efficient management is at using its assets to generate earnings. Formula: ROA = Net Income / Average Total Assets 'Calculate Ret...

OSAdmin by Community Manager
  • 31 Views
  • 0 comments
  • 0 kudos
Top Contributors