BDA Simple Code
Application Summary
BDA Simple Code is a library of over 150 action VB.Net objects that simplifies Business Rules, increases productivity, and reduces coding errors.
BDA Simple Code Overview
BDA Simple Code is a library of over 150 action VB.Net objects, methods, and properties that simplifies OneStream Business Rules, increases implementor productivity, and reduces coding errors. Complex and multipart object dereclarations and their required interrogations, configurations, and combinations are abstracted into simple objects and methods; BDA Simple Code makes OneStream Business Rules development better.
Setup and Installation
Class Declaration
The BDA Simple Code class must be referenced and then declared in any Business Rule that uses its functionality.
Reference
The BDA Simple Code class (with the exception of Formulas and Complex Expressions) must be referenced in each Business Rule that uses its objects, methods, and properties.
If BDA Simple Code is not needed in a rule, there is no need to reference or instantiate the class.
There are three references that differ by rule type:
1) Connectors: BR\BDA_DataFramework
2) Transformation Rule Conditional Expressions and Conditional Rules: BR\BDA_XRFramework
3) Everything else: BR\BDA_BRFramework
The below shows a Finance Business Rule's reference to BDA Simple Code:
Instantiation
Once referenced in the Business Rule Properties, the BDA Simple Code class must be instantiated to use its objects, methods, and properties.
In formulas, use this code to instantiate BDA Simple Code:
In all Business Rule types other than Data Source/Parser and Transformation/Conditional rules, use after the word "Try":
In Data Source/Parser Rules, use after the word "Try":
In Transformation/Conditional Rules, use after the word "Try":
Coding Primer
The BDA Simple Code at its core is a utility meant to simplify the coding process involved with writing OneStream Business Rules. However, as with any tool, a fundamental understanding of what exactly you are writing is necessary to use BDA Simple Code to its highest potential. This primer will hopefully serve as a jump off point to understanding this guide and its current implementations.
What is a Method / Function?
Simple Code takes complicated API calls, helper functions and collection manipulation algorithms and condenses them into a readily accessible format, often taking many lines of code and transforming them into single line calls---but how exactly does Simple Code do that? To understand this, we must first go over the definition of a Method / Function.
ad
A Function is simply defined as a set of instructions that perform a task. For example, a function named getApple can, as you might imagine, get apples---these instructions might look something like:
Find Apple Tree à Shake Tree à Pick up Apple off of Ground à Return Home with Apple
These set of instructions are what is referred to as the algorithm of the function, the process by which a task is executed.
A Method on the other hand, is the same idea as a function but is attributed to a specific object. getApple in this instance is a Method for humans but would not make much sense as a Method for a potato since a potato cannot do the same things a human can.
To use BDA Simple Code we must instantiate the "human" object that is capable of performing these simplifying methods and that is exactly what we do here when we are setting up a rule to use BDA Simple Code:
The programmers in the audience may have noticed at this point that VB.Net and C# are referred to as object-oriented programming languages and thus do not have functions that exist outside of the context of an object. So, it is particularly confusing when function and method are used interchangeably in those contexts since that distinction technically does not exist in VB.Net and C#.
In the context of VB.Net and C# and to avoid being pedantic, in this document, they are one and the same. However, it is important to understand this nomenclature so as not to be confused by outside additional reading!
Functions and Overloads
In VB.Net a function signature follows this format:
Function FunctionName [(ParameterList)] As ReturnType
For example, a single signature for GetMember in Simple Code looks like this:
Labeling this signature by their respective regions:
Red is the FunctionName. This is the name that must be called to execute the function. In this case, the name is "GetMember".
Green is the ParameterList. This is the list of input parameters that must be sent in within parenthesis. In this case, GetMember accepts two parameters: the first being a dimNameOrAbbreviation as a String and the second being a memberName as a String.
Yellow is the Type of the object returned once the function is finished. In this case, you can expect this function to return a OneStream Member object.
*Please note, that if return type is not specified within the documentation, then the function does not return a value and instead simply executes a series of instructions with no output.
Some sample business rule that uses GetMember might look like this then:
With the function returning this value into the output variable:
However, consider the possibility that you do not have the memberName as a String off hand, perhaps you only have the memberId given to you---is this function no longer available to use? *This* is where BDA Simple Code shines through as we take full advantage of the concept of Overloads to simplify the code logic. Overloading a procedure is to define multiple functions with the same name but each definition accepts different parameters. Logically, the function GetMember or the concept of "retrieving a OneStream Member" is straight forward. Therefore, we can use overloads to create multiple GetMember functions that accept different parameter signatures but still all just retrieve a member at the end of the day.
Going back to the idea of only having memberId, it is possible then to use GetMember with the following definition instead:
And here is another sample code block using that overload:
The concept of overloads are key to organizing functions by their purpose and BDA Simple Code uses this to provide as much flexibility as possible to the User.
With these key concepts out of the way, we can now go over how to read and use this Solution Guide.
How to Use / Read This Solution Guide
The solution guide is organized by purpose to group related functions together with a summary of how the functions are generally used within the context of OneStream. For example this group, "Metadata - Filter & query" is related to querying and filtering existing metadata objects within OneStream:
A function within this group looks like this example in Figure 1:
Figure 1. A sample entry within the Solution Guide.
Going through each labeled component:
- A - The function name.
- B - Summary of functions purpose.
- C - How to call the function and a list of all available overloads.
-
D - Detailed look at single overload (ordered by appearance in list given by C).
-
E - Detailed information regarding each input parameter. If there are
- additional notes regarding what these parameters mean, then those
-
notes will go here.
-
F - Example using specific function call.
-
G - Expected results from function.
Use this Solution Guide as reference whenever you have questions about how to use and implement BDA Simple Code functions to make your code cleaner, more readable and more maintainable!
Installation
The installation process for all BDA Solutions is the same: download the install zip file from Partner Place, import, and run the BDA_FW_Dashboard_Setup dashboard using the purchased product keys. The zip file contains all BDA Solutions; the keys unlock the purchased Solutions.
See the BDA Installation Solution Guide SV1.0.0 for more information.
BDA Simple Code Use Cases and Snippets
I. Calculations and Numbers
Use Cases
Random numbers are often required for test values during initial coding of a function.
RandomDecimal
Returns a random ds value between min and max with significant figures specified by decimalPlaces.
RandomDecimal with a decimalplaces property value of 0 is functionally the same as RandomInteger.
How To Use
RandomDecimal(Optional min As Decimal = 0, Optional max As Decimal = 100, Optional decimalPlaces As Integer = 4) As Decimal
# Parameters
min - Type Integer. Minimum range value. Default is 0.
max - Type Integer. Maximum range value. Default is 100.
decimalPlaces - Type Integer. Optional. Number of significant digits in output. Valid range of values from 0 to 28. Default is 4.
# Example
# Results
RandomInteger
Returns a random Integer value between min and max.
RandomDecimal with a decimalplaces property value of 0 is functionally the same as RandomInteger.
How To Use
RandomInteger(Optional min As Integer = 0, Optional max As Integer = 100) As Integer
# Parameters
min - Type Integer. Default is 0.
max - Type Integer. Default is 100.
# Example
II. Cell Detail
Use Cases
Cell Detail allows "below the line" data entry.
Cell Detail exists - as the name suggests - on a cell-by-cell basis. Querying, editing, adding, and deleting Cell Detail must be done through a Cube View or Quick View. Programmatic access is simplified through the ClearCellDetail, CopyCellDetail, GetCellDetailReadout, GetCellDetail, AddCellDetail methods.
For this section's examples, a sample single cell's Cell Detail is given as follows:\
ClearCellDetail
Clear out a single cell's Cell Detail - all Cell Detail rows for that cell are cleared.
How To Use
Function |
---|
ClearCellDetail(script As String) |
ClearCellDetail(msb As MemberScriptBuilder) |
ClearCellDetail(script As String)
# Parameters
script - Type formatted Member Script String.
# Example
# Results
This:
Becomes:
ClearCellDetail(msb As MemberScriptBuilder)
# Parameters
msb - Type MemberScriptBuilder.
# Example
Description automatically generated](media/image16.png)
# Results
This:
Becomes:
CopyCellDetail
Copy Cell Detail from one tuple to another.
CopyCellDetail supports either a String Member Script/tuple or a MemberScript object.
How To Use
CopyCellDetail(source As Object, target As Object)
# Parameters
source - Type formatted Member Script String or MemberScript.
target - Type formatted Member Script String or MemberScript.
# Example
# Results
Before the copy:
After the copy:
GetCellDetail
In list form, get the Line Item property values.
When Classification is set to Not Used (the default), GetCellDetail returns "0 (Default)".
How To Use
GetCellDetail(script As String) As List(Of LineItem)
GetCellDetail(msb As MemberScriptBuilder) As List(Of LineItem)
GetCellDetail(script As String) As List(Of LineItem)
# Parameters
script - Type formatted Member Script String.
# Example
# Results
GetCellDetail(msb As MemberScriptBuilder) As List(Of LineItem)
# Parameters
msb - Type MemberScriptBuilder.
GetCellDetailReadOut
Return a formatted String of Line Item operator, value, and description.
How To Use
GetCellDetailReadout(script As String) As String
GetCellDetailReadout(msb As MemberScriptBuilder) As String
GetCellDetailReadout(script As String) As String
# Parameters
script - Type formatted Member Script String.
# Example
# Results
GetCellDetailReadout(msb As MemberScriptBuilder) As String
# Parameters
msb - Type MemberScriptBuilder.
III. Conditional Logic
Use Cases
While testing data values can of course be accomplished within native .Net code, tests can take multiple lines of code; less code begets better productivity; these common use cases are one-line methods.
AllBlank
Returns a Boolean true if all elements in a comma delimited list are blank, or else false.
How To Use
AllBlank(Of T)(ParamArray collectionValues As T()) As Boolean
# Parameters
collectionValues - Type T(). This accepts an arbitrary number of input parameters. Only parameters of type String are valid.
# Example
# Results
The output below is depicted in descending chronological order.
AllFalse
Returns a Boolean true if all tests in a comma delimited list are false, or else false.
How To Use
AllFalse(ParamArray collectionValues As Boolean()) As Boolean
# Parameters
collectionValues - Type Boolean(). This accepts an arbitrary number of input parameters. Only parameters which evaluate as a Boolean expression are valid.
# Example
# Results
AllTrue
Returns a Boolean True if all tests in a comma delimited list are true, or else False.
How To Use
AllTrue(ParamArray collectionValues As Boolean()) As Boolean
# Parameters
collectionValues - Type Boolean(). This accepts an arbitrary number of input parameters. Only parameters which evaluate as a Boolean expression are valid.
# Example
# Results
The output below is depicted in descending chronological order.
Between and Between Inclusive
Returns a Boolean true if a number is between two other numbers. By default, this test does not include the lower and upper bounds.
How To Use
Between(value As Decimal, lower As Decimal, upper As Decimal, Optional inclusive As Boolean = False) As Boolean
# Parameters
value - Type Decimal. Input value to check against lower and upper bounds.
lower - Type Decimal. Lower bound of comparison.
upper - Type Decimal. Upper bound of comparison.
inclusive - Type Boolean. Include lower and upper bounds in comparison. Default is False.
# Example
# Results
ContainsAny
Tests a string against a comma-delimited list of other strings.
How To Use
ContainsAny(Of T)(value As T, ignoreCase As Boolean, ParamArray collectionValues As T()) As Boolean
# Parameters
value - Type T. Accept any generic Type as value. Note that this Type must be convertible into a String.
ignoreCase - Type Boolean. Enable/Disable case-sensitive comparison. Default is False.
collectionValues - Type T(). This accepts an arbitrary number of input parameters. Only parameters of type that are convertible into String are valid.
# Example
# Results
The output below is depicted in descending chronological order.
IfZeroThenUse
Tests the first parameter value for the value 0; if met, return the second numeric parameter value.
How To Use
IfZeroThenUse(val1 As Decimal, val2 As Decimal) As Decimal
# Parameters
val1 - Type Decimal.
val2 - Type Decimal.
# Example
# Results
In
Tests an initial value - numeric or string - against a comma-delimited list of values of n length and returns a Boolean result.
How To Use
[In](Of T)(value As T, ParamArray collectionValues As T()) As Boolean
# Parameters
value - Type T. This value must be of compatible type with collectionValues parameter.
collectionValues - Type T(). This value must be of compatible type with value parameter.
# Example
# Results
The output below is depicted in descending chronological order.
IV. Currency
Use Cases
In addition to assigning or retrieving currency properties and/or values through OneStream's UI, there may also be instances where work with FX rate properties/values may need to be done programmatically.
AssignFxRateToCube
Assigns defined FX rates to a specified Cube. As an example, an fx rate may need to be assigned as part of an accounting close.
If the Boolean parameter isRevenueExpenseType is True, the named rate is assigned to the Rate Type For Revenues and Expenses.
If the Boolean parameter isRevenueExpenseType is False, the named rate is assigned to the Rate Type For Assets and Liabilities.
How To Use
Function |
---|
AssignFxRateToCube(currencyType As String, cubeName As String, Optional isRevExp As Boolean = True) |
AssignFxRateToCube(currencyType As String, cubeId As Integer, Optional isRevExp As Boolean = True) |
AssignFxRateToCube(currencyType As String, cubeName As String, Optional isRevExp As Boolean = True)** |
# Parameters
currencyType - Type String.
cubeName - Type String.
isRevExp - Type Boolean. Default is True.
# Example
# Results
Assuming the Cube is Capex and that the Rate Type is Revenues and Expenses:
OpeningRate is assigned to the Revenue and Expenses Rate Type.
AssignFxRateToCube(currencyType As String, cubeId As Integer, Optional isRevExp As Boolean = True)
# Parameters
currencyType - Type String.
cubeId - Type Integer.
isRevExp - Type Boolean. Default is True.
#
GetFxRate
Retrieves a destination FX rate based on Time, Scenario, or Cube. The function will determine the implicit rate based on Workflow; additional optional parameters increase granularity.
The isRevenueOrExpenseType Boolean parameter can be replaced by a String Account name.
-
The overload parameters Time, Scenario, and Cube explicitly assigns those values, ignoring Workflow. Not all parameters need be assigned.
-
If providing Time, Scenario, or Cube to the function, use either IDs or names.
How To Use
By Time:
GetFxRate(sourceCurrencyName As String, IsRevExp As Boolean, timeName As String, Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
GetFxRate(sourceCurrencyName As String, IsRevExp As Boolean, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777)
By Account and Time:
GetFxRate(sourceCurrencyName As String, accountName As String, timeName As String, Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
GetFxRate(sourceCurrencyName As String, accountId As Integer, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777)
By Currency Type and Time:
GetFxRate(sourceCurrencyName As String, currencyType As String, Optional timeId As Integer = -777, Optional cubeId As Integer = -777, Optional destCurrencyName As String = \"\") As Decimal
GetFxRate(sourceCurrencyName As String, currencyType As String, timeName As String, Optional destCurrencyName As String = \"\") As Decimal
GetFxRate(sourceCurrencyName As String, IsRevExp As Boolean, timeName As String, Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
# Parameters
sourceCurrencyName - Type String.
IsRevExp - Type Boolean.
timeName - Type String.
scenarioName - Type String. Optional. Default uses current workflow POV.
cubeName - Type String. Optional. Default uses current workflow POV.
# Example
"
# Results
GetFxRate(sourceCurrencyName As String, IsRevExp As Boolean, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777)
# Parameters
sourceCurrencyName - Type String.
IsRevExp - Type Boolean.
timeId - Type Integer. Optional. Default uses current workflow POV.
scenarioId - Type Integer. Optional. Default uses current workflow POV.
cubeId - Type Integer. Optional. Default uses current workflow POV.
#
GetFxRate(sourceCurrencyName As String, accountName As String, timeName As String, Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
# Parameters
sourceCurrencyName - Type String.
accountName - Type String.
timeName - Type String.
scenarioName - Type String. Optional. Default uses current workflow POV.
cubeName - Type String. Optional. Default uses current workflow POV.
#
GetFxRate(sourceCurrencyName As String, accountId As Integer, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777)
# Parameters
sourceCurrencyName - Type String.
accountId - Type Integer.
timeId - Type Integer.
scenarioId - Type Integer. Optional. Default uses current workflow POV.
cubeId - Type Integer. Optional. Default uses current workflow POV.
#
GetFxRate(sourceCurrencyName As String, currencyType As String, Optional timeId As Integer = -777, Optional cubeId As Integer = -777, Optional destCurrencyName As String = \"\") As Decimal
# Parameters
sourceCurrencyName - Type String.
currencyType - Type String.
timeId - Type Integer. Optional. Default uses current workflow POV.
cubeId - Type Integer. Optional. Default uses current workflow POV.
destCurrencyName - Type String. Optional. Default uses default currency assigned to cubeId.
GetFxRate(sourceCurrencyName As String, currencyType As String, timeName As String, Optional destCurrencyName As String = \"\") As Decimal
# Parameters
sourceCurrencyName - Type String.
currencyType - Type String.
timeName - Type String. Optional. Default uses current workflow POV.
destCurrencyName - Type String. Optional. Default uses default currency assigned to cubeId.
#
LocalToReporting
Converts an amount to the default currency on the Cube (taking into consideration Time and Scenario) from the currently set Workflow POV by providing an Entity or currency within the application or manually by specifying Time, Scenario, and Cube.
The overload parameters Time, Scenario, and Cube explicitly assigns those values, ignoring Workflow. Not all parameters need be assigned.
If providing Time, Scenario, or Cube to the function, use either IDs or names.
How To Use
LocalToReporting(amount As Decimal, inputEntity As String, Optional IsRevExp As Boolean = True, Optional timeName As String = \"\", Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
LocalToReporting(amount As Decimal, inputEntityId As Integer, Optional IsRevExp As Boolean = True, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777) As Decimal
LocalToReporting(amount As Decimal, inputEntity As String, Optional IsRevExp As Boolean = True, Optional timeName As String = \"\", Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
# Parameters
amount - Type Decimal.
inputEntity - Type String.
IsRevExp - Type Boolean. Optional. Flag as Revenue Expense. Default is True.
timeName - Type String. Optional. Default uses current workflow POV.
scenarioName - Type String. Optional. Default uses current workflow POV.
cubeName - Type String. Optional. Default uses current workflow POV.
# Example
# Results
LocalToReporting(amount As Decimal, inputEntityId As Integer, Optional IsRevExp As Boolean = True, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777) As Decimal
# Parameters
amount - Type Decimal.
inputEntityId - Type Integer.
IsRevExp - Type Boolean. Optional. Flag as Revenue Expense. Default is True.
timeId - Type Integer. Optional. Default uses current workflow POV.
scenarioId - Type Integer. Optional. Default uses current workflow POV.
cubeId - Type Integer. Optional. Default uses current workflow POV.
#
ReportingToLocal
Converts an amount based on an entity's reporting currency and the default reporting currency on the currently selected Cube (taking into consideration Time and Scenario) on the Workflow POV or by manually specifying time, Scenario, and Cube.
The overload parameters Time, Scenario, and Cube explicitly assigns those values, ignoring Workflow. Not all parameters need be assigned.
If providing Time, Scenario, or Cube to the function, use either IDs or names.
How To Use
ReportingToLocal(amount As Decimal, outputEntity As String, Optional IsRevExp As Boolean = True, Optional timeName As String = \"\", Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
ReportingToLocal(amount As Decimal, outputEntityId As Integer, Optional IsRevExp As Boolean = True, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777) As Decimal
ReportingToLocal(amount As Decimal, outputEntity As String, Optional IsRevExp As Boolean = True, Optional timeName As String = \"\", Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal
# Parameters
amount - Type Decimal.
outputEntity - Type String.
IsRevExp - Type Boolean. Optional. Flag as Revenue Expense. Default is True.
timeName - Type String. Optional. Default uses current workflow POV.
scenarioName - Type String. Optional. Default uses current workflow POV.
cubeName - Type String. Optional. Default uses current workflow POV.
# Example
# Results
ReportingToLocal(amount As Decimal, outputEntityId As Integer, Optional IsRevExp As Boolean = True, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777) As Decimal
# Parameters
amount - Type Decimal.
outputEntityId - Type Integer.
IsRevExp - Type Boolean. Optional. Flag as Revenue Expense. Default is True.
timeId - Type Integer. Optional. Default uses current workflow POV.
scenarioId - Type Integer. Optional. Default uses current workflow POV.
cubeId - Type Integer. Optional. Default uses current workflow POV.
#
Triangulate
Converts an amount manually by providing both source and destination Entities, taking into consideration the currently selected Workflow POV. Time, Scenario, and Cube may also be manually set.
If providing Time, Scenario, or Cube to the function, use either IDs or names.
How To Use
Function |
---|
Triangulate(amount As Decimal, inputEntity As String, outputEntity As String, Optional IsRevExp As Boolean = True, Optional timeName As String = \"\", Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal |
Triangulate(amount As Decimal, inputEntityId As Integer, outputEntityId As Integer, Optional IsRevExp As Boolean = True, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777) As Decimal |
Triangulate(amount As Decimal, inputEntity As String, outputEntity As String, Optional IsRevExp As Boolean = True, Optional timeName As String = \"\", Optional scenarioName As String = \"\", Optional cubeName As String = \"\") As Decimal** |
# Parameters
amount - Type Decimal.
inputEntity - Type String.
outputEntity - Type String.
IsRevExp - Type Boolean. Optional. Flag as Revenue Expense. Default is True.
timeName - Type String. Optional. Default uses current workflow POV.
scenarioName - Type String. Optional. Default uses current workflow POV.
cubeName - Type String. Optional. Default uses current workflow POV.
# Example
# Results
Triangulate(amount As Decimal, inputEntityId As Integer, outputEntityId As Integer, Optional IsRevExp As Boolean = True, Optional timeId As Integer = -777, Optional scenarioId As Integer = -777, Optional cubeId As Integer = -777) As Decimal
# Parameters
amount - Type Decimal.
inputEntityId - Type Integer.
outputEntityId - Type Integer.
IsRevExp - Type Boolean. Optional. Flag as Revenue Expense. Default is True.
timeId - Type Integer. Optional. Default uses current workflow POV.
scenarioId - Type Integer. Optional. Default uses current workflow POV.
cubeId - Type Integer. Optional. Default uses current workflow POV.
V. Data
Use Cases
Manipulation of Cube-related data is one of the most common tasks within Business Rules. The collection of methods in this section enables simple execution of data-oriented tasks within OneStream.
BDA Simple Example data methods address: Data Buffers, Annotations, and Member Script And Value techniques.
CreateEmptyDataBuffer
Creates an empty Data Buffer in two ways: either a truly empty Data Buffer with no initial address or with an initial address through a Member Filter script.
If no Member filter script is provided, it will create an empty Data Buffer object.
Data Buffers exist within a Data Unit and cannot write outside of them (CreateEmptyDataBuffer is a precursor to writing Data Buffer); there is no need to define Cube, Entity, Scenario, Time, or Cons within the initial address.
How To Use
Function |
---|
CreateEmptyDataBuffer(script As String) As DataBuffer |
CreateEmptyDataBuffer(msb As MemberScriptBuilder) As DataBuffer |
CreateEmptyDataBufferLike(createLikeBuffer As DataBuffer) As DataBuffer |
CreateEmptyDataBuffer(script As String) As DataBuffer
# Parameters
script - Type formatted Member Script String.
# Example
# Results
CreateEmptyDataBuffer(msb As MemberScriptBuilder) As DataBuffer
# Parameters
msb - Type MemberScriptBuilder.
CreateEmptyDataBufferLike(createLikeBuffer As DataBuffer) As DataBuffer
# Parameters
createLikeBuffer - Type DataBuffer.
#
CreateEmptyDataBufferLike
Creates an empty Data Buffer with the same characteristics as the source Data Buffer parameter.
How To Use
CreateEmptyDataBufferLike(createLikeBuffer As DataBuffer) As DataBuffer
# Parameters
createLikeBuffer - Type DataBuffer.
# Example
# Results
SaveDataBuffer
Saves the Data Buffer to the target Data Buffer and constant script method properties.
The constant script must be base level Members that differ from the source Data Buffer's, e.g., if the source Data Buffer is based on O##Top, the constant script would contain O##Forms.
If a full Member Script is provided, then only View may need to be put in as the constant script (i.e., V##Periodic).
Use the optional isDurable property to force the data as durable if not already so configured in the Scenario settings.
How To Use
SaveDataBuffer(ByRef outputDataBuffer As DataBuffer, constantScript As String, Optional isDurable As Boolean = False)
# Parameters
outputDataBuffer - Type DataBuffer.
constantScript - Type String.
isDurable - Type Boolean. Optional. Default is False.
# Example
# Results
SetDataBufferCell
Within the target Data Buffer, assign a data value to the current cell to populate that target Data Buffer.
How To Use
SetDataBufferCell(ByRef destinationDataBuffer As DataBuffer, destinationCell As DataBufferCell, value As Decimal)
# Parameters
destinationDataBuffer - Type DataBuffer.
destinationCell - Type DataBufferCell.
value - Type Decimal.
# Example
# Results
ClearData
Clears data for a single data point (one combination of all 18 Dimensions).
Remarks:
-
ClearData can write outside of the current Data Unit.
-
All dimensions bar Parent must be defined either implicitly or explicitly.
-
The current Data Unit Members are assumed but can be explicitly overwritten.
-
Supports a Member Script, Member Script object, or DataCellPk.
-
An override parameter, overrideScript, can be used to vary Member tuple dimensionality.
-
The third parameter is an overload Boolean to preserve input data in O##Forms.
How To Use
Function |
---|
ClearData(script As String, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) |
ClearData(inputmsb As MemberScriptBuilder, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) |
ClearData(dataCellPk As DataCellPk, Optional scriptOverride As String = \"\") |
ClearData(script As String, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) As Decimal
# Parameters
script - Type formatted Member Script String.
scriptOverride - Type formatted Member Script String. Optional. If left blank, does not apply script override.
keepOverride - Type Boolean. Optional. Preserve override data.
# Example
# Results
ClearData(inputmsb As MemberScriptBuilder, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) As Boolean
# Parameters
inputmsb - Type MemberScriptBuilder.
scriptOverride - Type formatted Member Script String. Optional. If left blank, does not apply script override.
keepOverride - Type Boolean. Optional. Preserve override data.
#
ClearData(dataCellPk As DataCellPk, Optional scriptOverride As String = \"\")
# Parameters
inputmsb - Type DataCellPk.
scriptOverride - Type formatted Member Script String. Optional. If left blank, does not apply script override.
keepOverride - Type Boolean. Optional. Preserve override data.
#
GetData
Retrieve a single data cell at a specified data intersection.
Remarks:
-
GetData can retrieve data outside of the current Data Unit.
-
All dimensions bar Parent must be defined either implicitly or explicitly.
-
The current Data Unit Members are assumed but can be explicitly overwritten.
-
Supports a Member Script, Member Script object, or DataCellPk.
-
An override parameter, overrideScript, can be used to vary Member tuple dimensionality.
How To Use
Function |
---|
GetData(script As String, Optional scriptOverride As String = \"\") As Decimal |
GetData(msb As MemberScriptBuilder, Optional scriptOverride As String = \"\") As Decimal |
GetData(dataCellPk As DataCellPk, Optional scriptOverride As String = \"\") As Decimal |
GetData(script As String, Optional scriptOverride As String = \"\") As Decimal
# Parameters
script - Type formatted Member Script String.
scriptOverride - Type formatted Member Script String. Optional. If left blank, does not apply script override.
# Example
Description automatically generated](media/image68.png)
# Results
GetData(msb As MemberScriptBuilder, Optional scriptOverride As String = \"\") As Decimal
# Parameters
MemberScriptBuilder - Type MemberScriptBuilder.
scriptOverride - Type formatted Member Script String. Optional. If left blank, does not apply script override.
GetData(dataCellPk As DataCellPk, Optional scriptOverride As String = \"\")
# Parameters
dataCellPk - Type DataCellPk.
scriptOverride - Type formatted Member Script String. Optional. If left blank, does not apply script override.
#
GetAnnotation
Set a single annotation at a specified data intersection.
An optional second parameter can also be addded to override the script/PK in the second parameter (useful if you have a base intersection address and want to loop through and just deal with one or two extra members)
How To Use
Function |
---|
GetAnnotation(script As String) As String |
GetAnnotation(msb As MemberScriptBuilder) As String |
GetAnnotation(baseScript As String, Optional overrideScript As String = \"\") As String |
GetAnnotation(script As String) As String
# Parameters
script -Type formatted Member Script String.
# Example
# Results
GetAnnotation(msb As MemberScriptBuilder) As String
# Parameters
msb - Type MemberScriptBuilder.
GetAnnotation(baseScript As String, Optional overrideScript As String = \"\") As String
# Parameters
baseScript -Type formatted Member Script String.
overrideScript - Type String. Optional. If left blank, does not apply script override.
SetAnnotation
Set a single annotation at a specified data intersection.
Notes
-
All dimensions bar Parent must be defined either implicitly or explicitly.
-
The current Data Unit Members are assumed but can be explicitly overwritten.
-
Supports a Member Script, Member Script object, or DataCellPk.
-
An override parameter, overrideScript, can be used to vary Member tuple dimensionality.
-
SetAnnotation is a call to OneStream's annotation table, using a Cube's dimensionality as a key; it is not a Cube write operation. Relational writes can be expensive; exercise caution when using.
How To Use
Function |
---|
SetAnnotation(text As String, script As String, Optional scriptOverride As String = \"\") As Decimal |
SetAnnotation(text As String, tgtmsb As MemberScriptBuilder, Optional scriptOverride As String = \"\") As Boolean |
SetAnnotation(text As String, dataCellPk As DataCellPk, Optional scriptOverride As String = \"\") |
SetAnnotation(text As String, script As String, Optional scriptOverride As String = \"\") As Decimal
# Parameters
text - Type String. Annotation text.
script -Type formatted Member Script String.
scriptOverride - Type String. Optional. If left blank, does not apply script override.
# Example
# Results
SetAnnotation(text As String, tgtmsb As MemberScriptBuilder, Optional scriptOverride As String = \"\") As Boolean
Parameters
text - Type String. Annotation text.
tgtmsb -Type MemberScriptBuilder.
scriptOverride - Type String. Optional. If left blank, does not apply script override.
#
SetAnnotation(text As String, dataCellPk As DataCellPk, Optional scriptOverride As String = \"\")
Parameters
text - Type String. Annotation text.
dataCellPk - Type DataCellPk.
scriptOverride - Type String. Optional. If left blank, does not apply script override.
#
SetData
Set data for a single cell in O##Forms only usingscript as a String, MemberScriptBuilder, or DataCellPk.
SetData can write within - or outside - of the context of the currently executing Data Unit. It is an amalgamation of the MemberScriptAndValue objects and techniques in a single code line.
Note that each execution of SetData performs a MemberScriptAndValue commit, potentially incurring a performance cost when done in large numbers.
The result of SetData is not a calculated value but is instead treated as an Input Storage Type; as such, api.Data.ClearCalculatedData will not clear values created by SetData.
In general, this should not be used excessively as it will run through individual cells instead of using something like a Data Buffer.
How To Use
Function |
---|
SetData(value As Decimal, script As String, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) As Decimal |
SetData(value As Decimal, inputmsb As MemberScriptBuilder, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) As Boolean |
SetData(value As Decimal , dataCellPk As DataCellPk, Optional scriptOverride As String = \"\") |
SetData(value As Decimal, script As String, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) As Decimal
# Parameters
value - Type Decimal.
script -Type formatted Member Script String.
scriptOverride - Type String. Optional. If left blank, does not apply script override.
keepOverride - Type Boolean. Optional. Preserve override data.
# Example
# Results
SetData(value As Decimal, inputmsb As MemberScriptBuilder, Optional scriptOverride As String = \"\", Optional keepOverride As Boolean = False) As Boolean
# Parameters
value - Type Decimal.
inputmsb -Type MemberScriptBuilder.
scriptOverride - Type String. Optional. If left blank, does not apply script override.
keepOverride - Type Boolean. Optional. Preserve override data.
SetData(value As Decimal, dataCellPk As DataCellPk, Optional scriptOverride As String = \"\")
# Parameters
value - Type Decimal.
dataCellPk - Type DataCellPk.
scriptOverride - Type String. Optional. If left blank, does not apply script override.
#
VI. Files and Data Loads
Use Cases
File manipulation is a common component of OneStream implementations.
CopyAppFileToFileSystem
Copies a file from the application File Explorer folder to the currently executing user's Data Management folder, e.g., /Documents/Users/username/ExportTest.txt to C:\OneStream\FileShare\Applications\AVBS\Data Management\Export\username\ExportTest.txt.
How To Use
CopyAppFileToFileSystem(inputPath As String, Optional outputPath As String = \"\") As String
# Parameters
inputPath - Type String.
outputPath - Type String. Optional. Defaults to C:\OneStream\FileShare\Applications\AVBS\Data Management Export\username\ directory.
# Example
ExportRelationalTableToDataManagementFolderAsCSV
Exports a MSSQL table to the currently logged in users' export folder on file share.
How To Use
CopyAppFileToFileSystem(inputPath As String, Optional outputPath As String = \"\") As String
# Parameters
inputPath - Type String.
outputPath - Type String. Optional. Defaults to C:\OneStream\FileShare\Applications\AVBS\Data Management Export\username\ directory.
# Example
\'Run a query and save the results to the Data Management Export folder
\'Will save to the file system under /Applications/\<appName>/DataManagement/Export
bda.ExportRelationalTableToDataManagementFolderAsCSV(\"select * from Member\", \"\", \"myfile.csv\")
\'Will save to the file system under /Applications/\<appName>/DataManagement/Export/SampleExportFolder
bda.ExportRelationalTableToDataManagementFolderAsCSV(\"select * from Member\", \"SampleExportFolder\", \"myfile.csv\")
FilenameWithoutUniqueID
Removes the unique ID after loading an import file to stage through a base input Workflow profile.
This is particularly useful for parser rules to strip the unique ID on an import file.
How To Use
FilenameWithoutUniqueID(Optional filename = \"\")
# Parameters
filename - Type String. Defaults to current working filename in api.Parser.Transformer.FileInfo.
# Example
\' Generally used in the SourceID file of a data source
\' Change the data sourceID field to use to a complex expression and include these two lines:
Dim bda As New OneStream.BusinessRule.Parser.BDA_DataFramework.MainClass(si, globals, api)
Return bda.FilenameWithoutUniqueID
\'This can also be used with a specified filename
Dim uniqueName = bda.FilenameWithoutUniqueID(\"TestSource_XFe88bd2c9b15e4d0b84fe57c8d94c5e1a.txt\") Â Â \'will return TestSource.txt
VII. Forecasting (Only works with BDA Accordion)
Use Cases
BDA Accordion is a toolkit for building planning applications via prebuilt spread methods, Column Sets, Dashboards, and Business Rules.
BDA Accordion Solution is both a formal product - abstracted customizable code algorithms and prebuilt dashboard snap-together components within a graphical user interface that customizes dashboard contents, layout, and functionality in a reuse framework - as well as a methodology that applies this functionality to OneStream applications.
The methods below presuppose its usage. For more information, see the BDA Accordion Solution Guide (requires purchase).
GetAssumptionPeriodAnnual
Returns the annual assumption year and period (always M12) that contains assumptions for the full year.
Notes:
-
This example illustrates a Workflow year of 2011.
-
When no Time Member is passed to the method, the current Workflow year is used and M12 is appended.
-
If a year is explicitly passed, it is used and M12 is appended. If a year is passed with a month, the month is ignored and M12 is returned.
How To Use
GetAssumptionPeriodAnnual(Optional timeName As String = \"\") As String
# Parameters
timeName - Type String. Optional. If a timename with period is supplied, this function will set the period to the end of the year. E.g. GetAssumptionPeriodAnnual("2011M3") will return 2011M12.
# Example
# Results
This result assumes the Workflow year is 2011.
VIII. BDA Scenario Manager and Accordion
Use Cases
The Actual, Forecast, Budget, and LRP years and periods are driven through the BDA Scenario Manager dashboard to change Working (typically, but can be specified otherwise) Scenarios' Text1 through Text7.
From these settings the range and purpose of Accordion's display and calculation behavior are determined.
For full functionality, see the BDA Scenario Manager (requires purchase) and BDA Accordion Solution Guides (requires purchase).
For the purposes of code illustration, assume the below selections in Scenario Manager.
This translates to the following settings in the Working Scenario's Text settings:
These values drive the examples and the BDA Accordion's Scenario and Time functionality.
GetFirstFcstPeriodId
Returns the first Forecast period as an Integer Time ID.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetFirstFcstPeriodId(scenarioName As String) As Integer |
GetFirstFcstPeriodId(Optional scenarioId = -777) |
GetFirstFcstPeriodId(scenarioName As String) As Integer
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
GetFirstFcstPeriodId(Optional scenarioId = -777)
# Parameters
scenarioId - Type Integer. Optional. Defaults to current workflow Scenario.
# Example
# Results
GetFirstFcstPeriodName
Returns the first Forecast period name as a String.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetFirstFcstPeriodName(scenarioName As String) As String |
GetFirstFcstPeriodName(Optional scenarioId = -777) As String |
GetFirstFcstPeriodName(scenarioName As String) As String
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
GetFirstFcstPeriodName(Optional scenarioId = -777) As String
# Parameters
scenarioId - Type Integer. Optional. Defaults to current workflow Scenario.
# Example
# Results
GetFirstFcstPeriodScript
Returns first Forecast period name as a Member Script.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetFirstFcstPeriodScript(scenarioName As String) As String |
GetFirstFcstPeriodScript(Optional scenarioId = -777) As String |
GetFirstFcstPeriodScript(scenarioName As String) As String
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# GetFirstFcstPeriodScript(Optional scenarioId = -777) As String
# Parameters
scenarioId - Type Integer. Optional. Defaults to current workflow Scenario.
# Example
# Results
GetFirstFcstPeriodNumber
Returns the first Forecast period as an Integer.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetFirstFcstPeriodNumber(scenarioName As String) As Integer |
GetFirstFcstPeriodNumber(Optional scenarioId = -777) As Integer |
GetFirstFcstPeriodNumber(scenarioName As String) As Integer
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
GetFirstFcstPeriodNumber(Optional scenarioId = -777) As Integer
# Parameters
scenarioId - Type Integer. Optional. Defaults to current workflow Scenario.
# Example
# Results
GetLastActPeriodId
Returns the last Actual period as a Time ID.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetLastActPeriodId(scenarioName As String) As Integer |
GetLastActPeriodId(Optional scenarioId = -777) |
GetLastActPeriodId(scenarioName As String) As Integer
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# Example
# Results
GetLastActPeriodId(Optional scenarioId = -777)
# Parameters
scenarioId - Type Integer. Optional. Defaults to current workflow Scenario.
# Example
# Results
GetLastActPeriodName
Returns the last Actual period name as a String.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetLastActPeriodName(scenarioName As String) As Integer |
GetLastActPeriodName(Optional scenarioId = -777) |
GetLastActPeriodName(scenarioName As String) As Integer
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# Example
# Results
GetLastActPeriodName(Optional scenarioId = -777)
# Parameters
scenarioId - Type Integer. Optional. Defaults to current workflow Scenario.
# Example
# Results
GetLastActPeriodScript
Returns last Actual period name as a Member Script.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetLastActPeriodScript(scenarioName As String) As String |
GetLastActPeriodScript(Optional scenarioId = -777) |
GetLastActPeriodScript(scenarioName As String) As String
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# Example
# Results
GetLastActPeriodScript(Optional scenarioId = -777)
# Parameters
scenarioId - Type Integer. Optional. Defaults to current workflow Scenario.
# Example
# Results
GetNumberOfLRPPeriods
Returns the number of LRP periods based on the setting on
-
Param_config_BDA_FW_LRP_Granularity
-
Param_config_BDA_FW_LRP_Granularity
-
Param_default_BDA_FW_LRP_Granularity
Valid values for this configuration are as follows:
- Y ("Yearly") returns 1
- Q ("Quarterly") returns 4
- M ("Monthly") returns 12
If value is populated with valid I nteger, then that Integer is returned instead.
How To Use
GetNumberOfLRPPeriods()
# Example
# Results
GetNumberOfLRPYears
Returns the number of LRP years based on the setting in Param_config_BDA_FW_LRP_Years.
How To Use
GetNumberOfLRPYears()
# Example
# Results
GetPlanningPriorYear
Returns the prior planning year.
Notes
-
By default, uses the Workflow's Scenario.
-
Custom Scenario names can be passed to the function.
How To Use
Function |
---|
GetPlanningPriorYear() |
GetPlanningPriorYear(scenarioName As String) |
GetPlanningPriorYear(scenarioId As Integer) |
GetPlanningPriorYear()
# Example
# Results
GetPlanningPriorYear(scenarioName As String)
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# Example
# Results
GetPlanningPriorYear(scenarioId As Integer)
# Parameters
scenarioId - Type Integer. Defaults to current workflow Scenario.
# Example
# Results
GetPlanningBudgetYear
Returns the budget planning year (also known as NY - Next Year) as an Integer.
How To Use
Function |
---|
GetPlanningBudgetYear() |
GetPlanningBudgetYear(scenarioName As String) |
GetPlanningBudgetYear(scenarioId As Integer) |
GetPlanningBudgetYear()
# Example
# Results
GetPlanningBudgetYear(scenarioName As String)
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# Example
# Results
GetPlanningBudgetYear(scenarioId As Integer)
# Parameters
scenarioId - Type Integer. Defaults to current workflow Scenario.
# Example
# Results
GetPlanningForecastYear
Returns the forecast year as an integer.
How To Use
Function |
---|
GetPlanningForecastYear() |
GetPlanningForecastYear(scenarioName As String) |
GetPlanningForecastYear(scenarioId As Integer) |
GetPlanningForecastYear()
# Example
# Results
GetPlanningForecastYear(scenarioName As String)
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# Example
# Results
GetPlanningForecastYear(scenarioId As Integer)
# Parameters
scenarioId - Type Integer. Defaults to current workflow Scenario.
# Example
# Results
GetPlanningLRPYear
Returns the starting Long Range Plan (LRP is two years on from the current forecast, sometimes referred to as NY+1) year.
How To Use
Function |
---|
GetPlanningLRPYear() |
GetPlanningLRPYear(scenarioName As String) |
GetPlanningLRPYear(scenarioId As Integer) |
GetPlanningLRPYear()
# Example
# Results
GetPlanningLRPYear(scenarioName As String)
# Parameters
scenarioName - Type String. Defaults to current workflow Scenario.
# Example
# Results
GetPlanningLRPYear(scenarioId As Integer)
# Parameters
scenarioId - Type Integer. Defaults to current workflow Scenario.
# Example
# Results
isActualPeriod
Determines whether a period is an Actual period.
For following examples, Workflow POV is as follows:
How To Use
isActualPeriod() As Boolean
isActualPeriod(timeName As String) As Boolean
isActualPeriod(timeId As Integer, scenarioName As String) As Boolean
isActualPeriod(timeId As Integer, Optional scenarioId As Integer = -777) As Boolean
isActualPeriod(timeName As String, scenarioId As Integer) As Boolean
isActualPeriod() As Boolean
# Example
# Results
isActualPeriod(timeName As String) As Boolean
# Parameters
- timeName - Type String.
# Example
# Results
isActualPeriod(timeId As Integer, scenarioName As String) As Boolean
# Parameters
-
timeId - Type Integer.
-
scenarioName - Type String.
# Example
# Results
isActualPeriod(timeId As Integer, Optional scenarioId As Integer = -777) As Boolean
# Parameters
-
timeId - Type Integer.
-
scenarioId - Type Integer.
# Example
# Results
isActualPeriod(timeName As String, scenarioId As Integer) As Boolean
# Parameters
- timeName - Type String.
- scenarioId - Type Integer.
# Example
# Results
isFcstPeriod
Determines whether the Time and Scenario combination are within the forecast period range.
For the following examples, Workflow POV is as follows:
How To Use
Function |
---|
isFcstPeriod() As Boolean |
isFcstPeriod(timeName As String, Optional scenarioName As String = \"\") As Boolean |
isFcstPeriod(timeId As Integer, Optional scenarioName As String = \"\") As Boolean |
isFcstPeriod(timeId As Integer, Optional scenarioId As Integer = -777) As Boolean |
isFcstPeriod(timeName As String, Optional scenarioId As Integer = -777) As Boolean |
isFcstPeriod() As Boolean
# Example
# Results
isFcstPeriod(timeName As String, Optional scenarioName As String = \"\") As Boolean
# Parameters
-
timeName - Type String.
-
scenarioName - Type String.
# Example
# Results
isFcstPeriod(timeId As Integer, Optional scenarioName As String = \"\") As Boolean
# Parameters
-
timeId - Type Integer.
-
scenarioName - Type String.
# Example
# Results
isFcstPeriod(timeId As Integer, Optional scenarioId As Integer = -777) As Boolean
# Parameters
-
timeId - Type Integer.
-
scenarioId - Type Integer.
# Example
# Results
isFcstPeriod(timeName As String, Optional scenarioId As Integer = -777) As Boolean
# Parameters
-
timeName - Type String.
-
scenarioId - Type Integer.
# Example
# Results
IX. Logging & Debugging
Use Cases
Writing messages, either informational or as part of an active debugging activity to the OneStream Error Log is common practice.
Included in Simple Code are three methods that write to Error Log: Msg, Debug, and Ex.
Note that Error Log writes are expensive and can rapidly balloon storage requirements. Exercise care when logging and frequently clear your Error Log entries. Also, see the below sections on DebugUser and DebugShow for additional logging control.
IX. Part A - Logging Methods
The methods in this section can output messages to the error log and display their contents to the Error Log. See Additional Notes for full list of compatible objects with this feature.
Msg
Msg should be used to pipe information to the Error Log as required. It produces a tab-delimited list of values, using a comma delimited list.
How To Use
Msg(ParamArray messages As Object())
# Parameters
- messages - Type any Object. Takes an arbitrary number of
- comma-separated input parameters.
# Example
# Results
MsgLine
MsgLine concatenates a comma-delimited list of strings into a combined tab-delimited text string.
How To Use
MsgLine(ParamArray messages As Object()) As String
# Parameters
- messages - Type any Object. Takes an arbitrary number of
- comma-separated input parameters.
# Example
# Results
Debug
Debug can be used to trap errors during development. Like Msg, a comma-delimited list of properties writes output to the Error Log, although in a carriage return-delimited form.
It is superior to Msg because it breaks each logged element into its own error line, thus producing an easier-to-read log message when the item count is high, can be limited to a single username through DebugUser (the developer's Debug messages are output; other users' execution does not trigger a write), or even be turned off completely with DebugShow.
How To Use
Debug(ParamArray messages As Object())
# Parameters
- messages - Type any Object. Takes an arbitrary number of
- comma-separated input parameters.
# Examples
Debug with l
# Example 1
Note that bda.Debug is on line 35.
# Results
Debug with DebugUser
# Example 2
# Results
Will show nothing but will print if DebugUser is set to "Administrator".
Debug with Show
# Example 3
# Results
Will show all debug lines if DebugShow is set to True, otherwise it will not print to the log.
Ex
Ex throws a OneStream exception, completely stopping code execution of the relevant Business Rule with a message.
Ex requires Finance Business Rules to be executed through a Data Management step or the statement's logging information will not be written although a "Background Task Failed" message will show in the Error Log.
How To Use
Ex(ParamArray messages As Object())
# Parameters
- messages - Type any Object. Takes an arbitrary number of
- comma-separated input parameters.
# Example
# Results
Immediate dialog box from Extensibility Rule:
# Error Log:
IX. Part B - Debug Methods
l.## |
Within a log message, l## ("l" is the first letter in "line") writes the code line as part of the output for all error log methods. Use this quickly jump to a code line, especially when multiple Debug statements are used.
How To Use
l##()
# Example
# Results
Immediate dialog box from Extensibility Rule:
Error Log:
Version
Example that is developed on one release and then migrated to another may fail due to functionality differences across releases, e.g., development on the very latest release and production on an older one.
How To Use
Assuming current version is OS version is 6.3.0.:
GetOSVersion() returns a Decimal number 6.3
GetOSVersionMajor() returns an Integer of 6
GetOSVersionMinor() returns an Integer of 3
GetOSVersionRevision() returns an Integer of 0
Stopwatch
Finding specific bottlenecks in code often requires logging elapsed time within code blocks; this is particularly true in the case of complex functions. The Stopwatch methods allow the start, stop, and display of elapsed time in code.
StopwatchStart begins the clock, StopwatchStop ends it, and StopwatchGetTime reveals the elapsed time between those two statements.
How To Use
# Example
# Results
Note that the time is slightly longer than four seconds: this is the true execution time between the stopwatch start and stop, not the Sleep method's wait time.
Checkpoint
Checkpoint acts as a lap timer, i.e., it starts and stops the stopwatch timer and logs the output to the Error Log on each Checkpoint method invocation.
While the same functionality could be duplicated using Stopwatch (Start, Stop, and GetTime) and Debug, Checkpoint is a single line method.
How To Use
# Example
# Results
IX. Part C - Additional Notes
The following list of object types are capable of having their contents displayed in Error Log:
System.Double
System.Decimal
System.Integer
System.Int
System.Int32
System.Int16
System.Boolean
System.String
DataColumnCollection
System.Data.DataColumn
System.Data.DataRow
Valid datatypes within datarow values:
System.Decimal
System.Byte
System.String
System.Byte
System.Collections.Generic.List
System.Data.DataTable
Valid datatypes within datarow values:
System.Decimal
System.Byte
System.String
System.Byte
System.Collections.Generic.List
System.Collections.Generic.KeyValuePair
System.Collections.Concurrent.ConcurrentDictionary
System.Collections.Generic.Dictionary
System.Collections.Generic.Dictionary
System.Collections.Generic.List
OneStream.Shared.Common.NameValuePair
OneStream.Shared.Wcf.MemberScriptBuilder
OneStream.Shared.Common.Member
OneStream.Shared.Common.DataBufferCellPk
OneStream.Finance.Engine.PovApi
OneStream.Shared.Wcf.DataBufferCell
OneStream.Shared.Wcf.DataBuffer
OneStream.Shared.Common.DimType
OneStream.Shared.Wcf.XmlLoadExtractType
MatchCollection
CaptureCollection
GroupCollection
OrderedDictionary
DictionaryEntry
RegularExpressions.Group
RegularExpressions.Match
FinanceRulesApi
XmlExtractItemHierarchy
Exception
AggregateException
In the case that an object's content cannot be output as plain text into the Error Log, logging methods will instead output the object's type to the Error Log.
X. Metadata
Use Cases
Changing source data and metadata creates a need for dimensional maintenance in OneStream via scheduled or administrator-initiated Business Rules because absent dynamic metadata management, OneStream applications can suffer poor data quality and require heavy manual administrator effort.
Note that adding and removing Dimensions should be done with great care given their direct impact.
X. Part A - Metadata - Dimensions
AddDim
Add a new Dimension to the OS application by providing a parent Dimension as a String. In addition to naming the Dimension, the description, access group name, and the maintenance group name can also be modified.
How To Use
AddDim(dimName As String, parentDimName As String, Optional description As String = \"\", Optional accessGroupName As String = \"Everyone\", Optional maintenanceGroupName As String = \"Administrators\") As [Dim]
# Parameters
dimName - Type String.
parentDimName - Type String.
description - Type String.
accessGroupName - Type String.
maintenanceGroupName - Type String.
# Example
#
AddOrUpdateDim
Functionally the same as AddDim, but if the Dimension exists, it will update its properties.
How To Use
AddOrUpdateDim(dimName As String, parentDimName As String, Optional description As String = \"\", Optional accessGroupName As String = \"\", Optional maintenanceGroupName As String = \"\") As [Dim]
# Parameters
dimName - Type String.
parentDimName - Type String.
description - Type String. Optional. Defaults to empty String.
accessGroupName - Type String. Optional. Defaults to Everyone.
maintenanceGroupName - Type String. Optional. Defaults to Administrators.
# Example
# Results
RemoveDim
Remove a Dimension from the OS application by providing its name as a String.
How To Use
RemoveDim(dimName As String)
# Parameters
dimName - Type String.
# Example
# Results
GetCubeDim
Retrieve a Cube's Dimension by providing a Dimension abbreviation, Cube name, and Scenario name or type. The latter two properties can be ignored; in their absence Workflow is used to determine the values.
How To Use
Function |
---|
GetCubeDim(dimensionNameOrAbbr As String) As [Dim] |
GetCubeDim(dimensionNameOrAbbr As String, cubeName As String, Optional scenarioName As String = \"\", Optional isScenarioType As Boolean = False) As [Dim] |
GetCubeDim(dimensionNameOrAbbr As String, cubeId As Integer, Optional scenarioId As Integer = -1, Optional isScenarioType As Boolean = False) As [Dim] |
GetCubeDim(dimensionNameOrAbbr As String) As [Dim]
# Parameters
dimensionNameOrAbbr - Type String. Cube and Scenario default to current Workflow POV.
#
GetCubeDim(dimensionNameOrAbbr As String, cubeName As String, Optional scenarioName As String = \"\", Optional isScenarioType As Boolean = False) As [Dim]
# Parameters
dimensionNameOrAbbr - Type String.
cubeName - Type String.
scenarioName - Type String. Optional. Defaults to current Workflow POV.
isScenarioType - Type Boolean. Optional. Defaults to False.
# Example
Cube Dimensions for Houston:
# Results
GetCubeDim(dimensionNameOrAbbr As String, cubeId As Integer, Optional scenarioId As Integer = -1, Optional isScenarioType As Boolean = False) As [Dim]
# Parameters
dimensionNameOrAbbr - Type String.
cubeId - Type Integer.
secnarioId - Type Integer. Optional. Defaults to current Workflow POV.
isScenarioType - Type Boolean. Optional. Defaults to False.
#
GetDimName
Retrieve a Dimension name using its abbreviation or DimTypeID.
How To Use
Function |
---|
GetDimName(memberOrDim As Object) As String |
GetDimName(dimTypeId As Integer, dimId As Integer) As String |
GetDimName(dimensionNameOrAbbr As String, memberOrDim As Object) As String |
GetDimName(memberOrDim As Object) As String
# Parameters
memberOrDim - Type generic Object. Valid data types for this Object are as follows:
-
member name as String
-
member Id as Integer
-
Member info object as OneStream.Shared.Wcf.MemberInfo
-
Member object as OneStream.Shared.Common.Member
#
GetDimName(dimTypeId As Integer, dimId As Integer) As String
# Parameters
dimTypeId - Type Integer.
dimId - Type Integer.
#
GetDimName(dimensionNameOrAbbr As String, memberOrDim As Object) As String
# Parameters
dimensionNameOrAbbr - Type String.
memberOrDim - Type generic Object. Valid data types for this Object are as follows:
-
member name as String
-
member Id as Integer
-
Member info object as OneStream.Shared.Wcf.MemberInfo
-
Member object as OneStream.Shared.Common.Member
# Example
# Results
GetAbbr
Retrieves the abbreviation of a Dimension by providing the Dimension name.
How To Use
GetAbbr(dimensionNameOrAbbr As String) As String
# Parameters
dimNameOrAbbreviation - Type String.
# Example
# Results
GetDim
Returns the Dimension name as a String in four different ways: Dimension abbreviation (see GetAbbr) and DimId, Dimension DimType and DimId, Member's Member object, or Member's MemberInfo.
Retrieves any Dimension in the Dimension library by providing a Dimension name as a String, DimPk, or Member.
The primary use case is to determine a Member's dimension based on a Member or MemberInfo object.
How To Use
Function |
---|
GetDim(dimNamePkOrMember As Object) As [Dim] |
GetDim(dimensionNameOrAbbr As String, mbrOrDim As Object) As [Dim] |
GetDim(dimTypeId As Integer, mbrOrDim As Object) As [Dim] |
GetDim(dimNamePkOrMember As Object) As [Dim]
# Parameters
dimNamePkOrMember - Type generic Object. Valid data types for this Object are as follows:
-
Member name as String
-
Dim name as String
-
Member ID as Integer
-
Dim ID as Integer
-
Member info object as OneStream.Shared.Wcf.MemberInfo
GetDim(dimensionNameOrAbbr As String, mbrOrDim As Object) As [Dim]
# Parameters
dimNameOrAbbreviation - Type String.
mbrOrDim - Type generic Object. Valid data types for this Object are as follows:
-
Member name as String
-
Dim name as String
-
Member ID as Integer
-
Dim ID as Integer
-
Member info object as OneStream.Shared.Wcf.MemberInfo
-
Member object as OneStream.Shared.Common.Member
# Example
# Results
GetDim(dimTypeId As Integer, mbrOrDim As Object) As [Dim]
# Parameters
dimTypeId - Type Integer.
mbrOrDim - Type generic Object. Valid data types for this Object are as follows:
-
Member name as String
-
Dim name as String
-
Member ID as Integer
-
Dim ID as Integer
-
Member info object as OneStream.Shared.Wcf.MemberInfo
-
Member object as OneStream.Shared.Common.Member
UpdateDim
Updates the Dimension description, Access Group name, and Maintenance Group name by providing the Dimension name a string.
How To Use
UpdateDim(dimName As String, Optional description As String = \"\", Optional accessGroupName As String = \"Everyone\", Optional maintenanceGroupName As String = \"Administrators\") As [Dim]
# Parameters
dimName - Type String.
description - Type String. Optional. Defaults to empty String.
accessGroupName - Type String. Optional. Defaults to Everyone.
maintenanceGroupName - Type String. Optional. Defaults to Administrators.
# Example
# Results
X. Part B - Metadata - Filter & Query
Use Cases
Interrogating and filtering Members within Business Rules is an integral part of defining data scope in Business Rules.
MemberExists
Checks if member exists within specified dimension name or dimension abbreviation.
How To Use
MemberExists(abbreviation As String, memberName As String) As Boolean
MemberExists(abbreviation As String, memberId As Integer) As Boolean
MemberExists(abbreviation As String, memberName As String) As Boolean
# Parameters
abbreviation - Type String.
memberName - Type String.
# Example
# Results
MemberExists(abbreviation As String, memberId As Integer) As Boolean
# Parameters
abbreviation - Type String.
memberId - Type Integer.
# Example
# Results
GetMembersExcluding
Returns a List(Of Members) that excludes individual or Member filter-driven Members by passing the Dimension name or abbreviation, the initial Member filter to exclude from, and then a comma-delimited list of excluded Members. The third parameter is a Boolean that can be set to True in case the removal of duplicates is desired.
How To Use
GetMembersExcluding(dimension As String, filter As String, removeDupes As Boolean, ParamArray excludes As String())
GetMembersExcluding(dm As [Dim], filter As String, removeDupes As Boolean, ParamArray excludes As String())
GetMembersExcluding(dimension As String, filter As String, removeDupes As Boolean, ParamArray excludes As String())
# Parameters
-
dimension - Type String.
-
filter - Type String.
-
removeDupes - Type Boolean. Set to True to remove duplicate entries
-
from output.
-
excludes - Type String(). Takes an arbitrary number of
- comma-separated input parameters.
# Example
# Results
GetMembersExcluding(dm As [Dim], filter As String, removeDupes As Boolean, ParamArray excludes As String())
# Parameters
dm - Type OneStream.Shared.Wcf.Dim.
-
filter - Type String.
-
removeDupes - Type Boolean. Set to True to remove duplicate entries
-
from output.
-
excludes - Type String(). Takes an arbitrary number of
- comma-separated input parameters.
#
GetAccountType
Returns the Account type as a String.
How To Use
Function |
---|
GetAccountType(accountName As String) As String |
GetAccountType(accountID As Integer) As String |
GetAccountType(accountName As String) As String
# Parameters
- accountName - Type String.
# Example
# Results
GetAccountType(accountID As Integer) As String
# Parameters
- accountID - Type String.
#
GetAccountTypeId
Returns the account type ID as an Integer.
How To Use
Function |
---|
GetAccountTypeID(accountName As String) As String |
GetAccountTypeID(accountID As Integer) As String |
GetAccountTypeID(accountName As String) As String
# Parameters
- accountName - Type String.
# Example
# Results
GetAccountTypeID(accountID As Integer) As String
# Parameters
- accountID - Type String.
GetAggWeight
Returns the aggregation weight for a Member as a Decimal.
How To Use
Function |
---|
GetAggWeight(dimNameOrAbbreviation As String, memberName As String, parentName As String, Optional varyScenTypeId As Integer = -1, Optional varyTimeId As Integer = -1) As Decimal |
GetAggWeight(dimNameOrAbbreviation As String, memberId As Integer, parentId As Integer, Optional varyScenTypeId As Integer = -1, Optional varyTimeId As Integer = -1) As Decimal |
GetAggWeight(dimNameOrAbbreviation As String, memberName As String, parentName As String, Optional varyScenTypeId As Integer = -1, Optional varyTimeId As Integer = -1) As Decimal
# Parameters
-
dimNameOrAbbreviation - Type String.
-
memberName - Type String.
-
parentName - Type String.
-
varyScenTypeId - Type Integer. Optional. Only applicable for
-
Percent Consolidation---for other usage, leave blank.
-
varyTimeId - Type Integer. Optional. Only applicable for Percent
- Consolidation---for other usage, leave blank
# Example
# Results
GetAggWeight(dimNameOrAbbreviation As String, memberId As Integer, parentId As Integer, Optional varyScenTypeId As Integer = -1, Optional varyTimeId As Integer = -1) As Decimal
# Parameters
-
dimNameOrAbbreviation - Type String.
-
memberId - Type Integer.
-
parentName - Type String.
-
varyScenTypeId - Type Integer. Optional. Only applicable for
-
Percent Consolidation---for other usage, leave blank.
-
varyTimeId - Type Integer. Optional. Only applicable for Percent
- Consolidation---for other usage, leave blank
GetDesc
Returns the description of a Member by providing either its Dimension name (or Dimension token) as a String.
How To Use
Function |
---|
GetDesc(dimNameOrAbbreviation As String, memberName As String) As String |
GetDesc(dimNameOrAbbreviation As String, memberId As Integer) As String |
GetDesc(dimNameOrAbbreviation As String, memberName As String) As String
# Parameters
-
dimNameOrAbbreviation - Type String.
-
memberName - Type String.
# Example
# Results
GetDesc(dimNameOrAbbreviation As String, memberId As String) As String
# Parameters
-
dimNameOrAbbreviation - Type String.
-
memberId - Type Integer.
#
GetMemberInfos
Returns a List(Of MemberInfo) by providing a Dimension name (or Dimension token) as a String and a Member filter script.
How To Use
Function |
---|
GetMemberInfos(dimension As String, filter As String, Optional removeDupes As Boolean = False) |
GetMemberInfos(dm As [Dim], filter As String, Optional removeDupes As Boolean = False) |
GetMemberInfos(dimension As String, filter As String, Optional removeDupes As Boolean = False)
# Parameters
-
dimension - Type String.
-
filter - Type String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
- duplicate entries from output.
# Example
# Results
The below results reflects the Debug method's logging functionality of Lists.
GetMemberInfos(dm As [Dim], filter As String, Optional removeDupes As Boolean = False)
# Parameters
-
dm - Type OneStream.Shared.Wcf.Dim.
-
filter - Type String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
- duplicate entries from output.
GetMemberNames
Returns a List(Of String) of Member names by providing a Dimension name or abbreviation and a Member Script filter.
How To Use
Function |
---|
GetMemberNames(dimension As String, filter As String, Optional removeDupes As Boolean = False) |
GetMemberNames(dm As [Dim], filter As String, Optional removeDupes As Boolean = False) |
GetMemberNames(dimension As String, filter As String, Optional removeDupes As Boolean = False)
# Parameters
-
dimension - Type String.
-
filter - Type String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
- duplicate entries from output.
# Example
# Results
The output below reflects the Debug method's output of a GetMemberNames list.
GetMemberNames(dm As [Dim], filter As String, Optional removeDupes As Boolean = False)
# Parameters
-
dm - Type OneStream.Shared.Wcf.Dim.
-
filter - Type String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
- duplicate entries from output.
#
GetMemberNameListAsString
Returns a list of comma-delimited Member names from a Dimension name or abbreviation and a Member filter. Optional prefix and/or suffix parameters append values to the beginning and end of the retrieved Member names.
How To Use
GetMemberNameListAsString(dimension As String, filter As String, Optional removeDupes As Boolean = False, Optional prefix As String = \"\", Optional suffix As String = \"\", Optional delim As String = \",\")
GetMemberNameListAsString(dm As [Dim], filter As String, Optional removeDupes As Boolean = False, Optional prefix As String = \"\", Optional suffix As String = \"\", Optional delim As String = \",\")
GetMemberNameListAsString(dimension As String, filter As String, Optional removeDupes As Boolean = False, Optional prefix As String = \"\", Optional suffix As String = \"\", Optional delim As String = \",\")
# Parameters
-
dimension - Type String.
-
filter - Type formatted Member Script String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
-
duplicate entries from output.
-
prefix - Type String. Optional. Append parameter as prefix to
-
output.
-
suffix - Type String. Optional. Append parameter as suffix to
-
output.
-
delim - Type String. Optional. Use parameter as delimiter in
- output. Default is ",".
# Example
# Results
GetMemberNameListAsString(dm As [Dim], filter As String, Optional removeDupes As Boolean = False, Optional prefix As String = \"\", Optional suffix As String = \"\", Optional delim As String = \",\")
# Parameters
dm - Type OneStream.Shared.Wcf.Dim.
-
filter - Type formatted Member Script String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
-
duplicate entries from output.
-
prefix - Type String. Optional. Append parameter as prefix to
-
output.
-
suffix - Type String. Optional. Append parameter as suffix to
-
output.
-
delim - Type String. Optional. Use parameter as delimiter in
- output. Default is ",".
GetMemberNameListAsStringExcluding
Returns the same result as GetMemberNameListAsString but with Member exclusion through Member filter parameters. Duplicate Members are removed via a removeDuplicates Boolean value. A prefix string is appended to Member names.
How To Use
Function |
---|
GetMemberNameListAsStringExcluding(dimension As String, filter As String, prefix As String, suffix As String, removeDupes As Boolean, ParamArray excludes As String()) |
GetMemberNameListAsStringExcluding(dm As [Dim], filter As String, prefix As String, suffix As String, removeDupes As Boolean, ParamArray excludes As String()) |
GetMemberNameListAsStringExcluding(dimension As String, filter As String, prefix As String, suffix As String, removeDupes As Boolean, ParamArray excludes As String())
# Parameters
dimension - Type String.
-
filter - Type formatted Member Script String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
-
duplicate entries from output.
-
prefix - Type String. Optional. Append parameter as prefix to
-
output.
-
suffix - Type String. Optional. Append parameter as suffix to
-
output.
-
excludes - Type String(). Takes an arbitrary number of
- comma-separated input parameters.
# Example
# Results
GetMemberNameListAsStringExcluding(dm As [Dim], filter As String, prefix As String, suffix As String, removeDupes As Boolean, ParamArray excludes As String())
# Parameters
dm - Type OneStream.Shared.Wcf.Dim.
-
filter - Type formatted Member Script String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
-
duplicate entries from output.
-
prefix - Type String. Optional. Append parameter as prefix to
-
output.
-
suffix - Type String. Optional. Append parameter as suffix to
-
output.
-
excludes - Type String(). Takes an arbitrary number of
- comma-separated input parameters.
GetMembers
Retrieves a List(Of Member) of Members (not MemberInfos) based on a dimension name or abbreviation and a Member filter script.
How To Use
Function |
---|
GetMembers(dimension As String, filter As String, Optional removeDupes As Boolean = False) As List(Of Global.OneStream.Shared.Common.Member) |
GetMembers(dm As [Dim], filter As String, Optional removeDupes As Boolean = False) As List(Of Global.OneStream.Shared.Common.Member) |
GetMembers(dimension As String, filter As String, Optional removeDupes As Boolean = False) As List(Of Global.OneStream.Shared.Common.Member)
# Parameters
dimension - Type String.
-
filter - Type formatted Member Script String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
- duplicate entries from output.
# Example
# Results
The output below reflects the Debug method's output of a GetMembers list.
GetMembers(dm As [Dim], filter As String, Optional removeDupes As Boolean = False) As List(Of Global.OneStream.Shared.Common.Member)
# Parameters
dm - Type OneStream.Shared.Wcf.Dim.
-
filter - Type formatted Member Script String.
-
removeDupes - Type Boolean. Optional. Set to True to remove
- duplicate entries from output.
#
GetMember
Returns the Member object of a Member name and Dimension name or abbreviation.
How To Use
Function |
---|
GetMember([dim] As Global.OneStream.Shared.Wcf.Dim, memberName As String) As Global.OneStream.Shared.Common.Member |
GetMember([dim] As Global.OneStream.Shared.Wcf.Dim, memberId As Integer) As Global.OneStream.Shared.Common.Member |
GetMember(dimNameOrAbbreviation As String, memberId As Integer) As Global.OneStream.Shared.Common.Member |
GetMember(dimNameOrAbbreviation As String, memberName As String) As Global.OneStream.Shared.Common.Member |
GetMember([dim] As Global.OneStream.Shared.Wcf.Dim, memberName As String) As Global.OneStream.Shared.Common.Member
# Parameters
[dim] - Type OneStream.Shared.Wcf.Dim.
memberName - Type String.
# Example
# Results
GetMember([dim] As Global.OneStream.Shared.Wcf.Dim, memberId As Integer) As Global.OneStream.Shared.Common.Member
# Parameters
[dim] - Type OneStream.Shared.Wcf.Dim.
memberId - Type Integer.
# Example
# Results
GetMember(dimNameOrAbbreviation As String, memberId As Integer) As Global.OneStream.Shared.Common.Member
# Parameters
[dim] - Type OneStream.Shared.Wcf.Dim.
memberId - Type Integer.
# Example
# Results
GetMember(dimNameOrAbbreviation As String, memberName As String) As Global.OneStream.Shared.Common.Member
# Parameters
dimNameOrAbbreviation - Type String. Explicit dimension name or abbreviation is valid.
memberId - Type Integer.
# Example
# Results
GetId
Returns the ID of a Member as an Integer via a Member name and Dimension name or abbreviation.
GetId(dimNameOrAbbreviation As String, memberObject As Object) As Integer
# Parameters
dimNameOrAbbreviation - Type String.
memberObject - Type generic Object. Valid types for this generic object are:
-
member name as String
-
memberId as Integer
-
Member info object as OneStream.Shared.Wcf.MemberInfo
-
Member object as OneStream.Shared.Common.Member
# Example
# Results
GetMemberInfo
Returns a Member's MemberInfo object via a Member name and Dimension name or abbreviation.
How To Use
Function |
---|
GetMemberInfo(dimNameOrAbbreviation As String, memberId As Integer) As Global.OneStream.Shared.Wcf.MemberInfo |
GetMemberInfo(dimNameOrAbbreviation As String, memberName As String) As Global.OneStream.Shared.Wcf.MemberInfo |
GetMemberInfo(dimNameOrAbbreviation As String, memberId As Integer) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimNameOrAbbreviation - Type String.
memberId - Type Integer.
# Example
# Results
The output below reflects the Debug method's output of a GetMemberInfo method that returns a MemberInfo object.
GetMemberInfo(dimNameOrAbbreviation As String, memberName As String) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimNameOrAbbreviation - Type String.
memberName - Type String.
#
GetName
Retrieves the name of a Member by providing a Dimension name (or Dimension token) as well as its ID.
How To Use
GetName(abbreviation As String, memberObject As Object) As String
# Parameters
abbreviation - Type String.
memberObject - Type generic Object. Valid types for this generic object are:
-
member name as String
-
memberId as Integer
-
Member info object as OneStream.Shared.Wcf.MemberInfo
-
Member object as OneStream.Shared.Common.Member
# Example
# Results
GetText
Retrieves the text on a Member by providing a Dimension name, Member name, and text property number.
How To Use
Function |
---|
GetText(dimensionNameOrAbbr As String, memberName As String, textNumber As Integer, Optional scenarioType As String = \"-1\", Optional timeId As String = \"-1\") As String |
GetText(dimensionNameOrAbbr As String, memberId As Integer, textNumber As Integer, Optional scenarioType As String = \"-1\", Optional timeId As String = \"-1\") As String |
GetText(dimensionNameOrAbbr As String, memberName As String, textNumber As Integer, Optional scenarioType As String = \"-1\", Optional timeId As String = \"-1\")
# Parameters
dimNameOrAbbreviation - Type String.
memberName - Type String.
textNumber - Type Integer.
scenarioType - Type String. Optional. Defaults to current Workflow POV.
timeId - Type String. Optional. Defaults to current Workflow POV.
# Example
# Results
GetText(dimensionNameOrAbbr As String, memberId As Integer, textNumber As Integer, Optional scenarioType As String = \"-1\", Optional timeId As String = \"-1\") As String
# Parameters
dimNameOrAbbreviation - Type String.
memberId - Type Integer.
textNumber - Type Integer.
scenarioType - Type String. Optional. Defaults to current Workflow POV.
timeId - Type String. Optional. Defaults to current Workflow POV.
#
IsBalanceType
Checks the balance type of an Account and returns a Boolean value.
How To Use
Function |
---|
IsBalanceType(accountName As String) As Boolean |
IsBalanceType(accountId As Integer) As Boolean |
IsBalanceType(accountName As String) As Boolean
# Parameters
accountName - Type String.
# Example
# Results
IsBalanceType(accountId As Integer) As Boolean
# Parameters
accountId - Type Integer.
X. Part C - Metadata - Maintenance
Use Cases
The methods in this section allow for programmatic metadata maintenance. These can be used to create automated processes or administrative maintenance dashboards.
AddMember
Adds a Member via a Dimension name, new Member name, existing parent name, and desired description.
How To Use
AddMember(dimensionNameOrAbbr As String, memberName As String, parentName As String, description As String, Optional txt1 As String = \"\", Optional txt2 As String = \"\", Optional txt3 As String = \"\", Optional txt4 As String = \"\", Optional txt5 As String = \"\", Optional txt6 As String = \"\", Optional txt7 As String = \"\", Optional txt8 As String = \"\") As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
parentName - Type String.
description - Type String. Optional. Defaults to blank String.
txt1 - Type String. Optional. Defaults to blank String.
txt2 - Type String. Optional. Defaults to blank String.
txt3 - Type String. Optional. Defaults to blank String.
txt4 - Type String. Optional. Defaults to blank String.
txt5 - Type String. Optional. Defaults to blank String.
txt6 - Type String. Optional. Defaults to blank String.
txt7-- Type String. Optional. Defaults to blank String.
txt8 - Type String. Optional. Defaults to blank String.
# Example
# Results
# AddMember with Text 1 to Text 8 data
AddMember has additional parameters to add text data. Define Text 1 through Text 8 after the description parameter.
Note that Text properties are position dependent; pass an empty string to unvalued Text attributes.
# Example
# Results
# AddMember without Description
Omit the description from AddMember function to add a Member without its description. Note that this is only available if Text fields 1-8 are unnecessary.
# Example
# Results
AddOrUpdateMember
Adds a Member via a Dimension name, new Member name, existing parent name, and desired description with optional text field updates if Member does not already exist. If member does exist, then the member's description and text fields only are updated.
How To Use
AddOrUpdateMember(dimensionNameOrAbbr As String, memberName As String, parentName As String, description As String, Optional txt1 As String = \"\", Optional txt2 As String = \"\", Optional txt3 As String = \"\", Optional txt4 As String = \"\", Optional txt5 As String = \"\", Optional txt6 As String = \"\", Optional txt7 As String = \"\", Optional txt8 As String = \"\") As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
parentName - Type String.
description - Type String. Optional. Defaults to blank String.
txt1 - Type String. Optional. Defaults to blank String.
txt2 - Type String. Optional. Defaults to blank String.
txt3 - Type String. Optional. Defaults to blank String.
txt4 - Type String. Optional. Defaults to blank String.
txt5 - Type String. Optional. Defaults to blank String.
txt6 - Type String. Optional. Defaults to blank String.
txt7-- Type String. Optional. Defaults to blank String.
txt8 - Type String. Optional. Defaults to blank String.
# Example
# Results
CopyMember
CopyMember copies a Member to a new parent Member by providing a Dimension name or abbreviation, the Member to be copied, its current parent Member, and the new parent Member.
The copied Member is, in dimensional parlance, a "shared" Member as it is shared across hierarchies.
How To Use
CopyMember(dimensionNameOrAbbr As String, memberName As String, oldParentName As String, newParentName As String) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
oldParentName - Type String.
newParentName - Type String.
# Example
# Results
MoveMember
MoveMember moves a Member to a new parent Member by providing a Dimension name or Dimension abbreviation, the Member to be moved, its current parent Member, and the new parent Member.
How To Use
MoveMember(dimensionNameOrAbbr As String, memberName As String, oldParentName As String, newParentName As String, Optional copy As Boolean = False) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
oldParentName - Type String.
newParentName - Type String.
copy - Type Boolean. Set to True to move member as a copy to new parent.
# Example
# Results
RemoveMember
Removes a Member from a Dimension by providing a Dimension name or abbreviation as well as the Member to be removed. Note that this must be a base Member.
Note that RemoveMember does not remove Members with data. See the RemoveMemberAndData method for that functionality.
How To Use
Function |
---|
RemoveMember(dimensionNameOrAbbr As String, memberName As String) As Boolean |
RemoveMember(dimensionNameOrAbbr As String, memberId As Integer) As Boolean |
RemoveMember(dimensionNameOrAbbr As String, memberName As String) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
# Example
# Results
RemoveMember(dimensionNameOrAbbr As String, memberName As String) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
memberId - Type Integer.
#
RemoveMemberAndData
Removes a Member and its data from the Dimension library by passing a Dimension or abbreviation name and the Member name to be deleted. Note that this must be a base Member.
Important Note: removal of a Member and its data requires two code steps: the first to initiate the deletion by placing the Member into a removal queue and the second to execute that deletion queue. These are discrete code lines to allow the list of Members to be deleted defined first (typically in a loop) and then deleted en masse.
RemoveMemberAndData adds a member to the removal queue, RunRemovalQueue performs the true deletion.
See RemoveNodeAndData to delete parent level Members.
How To Use
RemoveMemberAndData(dimensionNameOrAbbr As String, memberName As String) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
# Example
Given the Member TestRemoveMember in the HoustonAccounts dimension with data:
RemoveMemberAndData adds TestRemoveMember to the removal queue, RunRemovalQueue executes the deletion process.
# Results
The Member TestRemoveMember is be renamed, moved to the Dimension's orphans, and then deleted along with its data in a background process. Deletion time varies depending on number deleted, server load, etc. Deletion is a background process.
As seen here:
Confirmation can also be seen in the error log:
RenameMember
Renames a Member by passing a Dimension name, the current name of the Member, its new name, and an optional description.
How To Use
RenameMember(dimensionNameOrAbbr As String, memberName As String, newMemberName As String, Optional newDescription As Object = Nothing)
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
newMemberName - Type String.
newDescription - Type String. Optional. Defaults to empty String.
# Example
# Results
SetAccountType
Sets the account type on an Account Member by passing the Account name and its new Account Type.
How To Use
Function |
---|
SetAccountType(accountName As String, accountTypeName As String) |
SetAccountType(accountId As Integer, accountTypeName As String) |
SetAccountType(accountName As String, accountTypeName As String)
# Parameters
accountName - Type String.
accountTypeName - Type String.
# Example
# Results
SetAccountType(accountId As Integer, accountTypeName As String)
# Parameters
accountId - Type Integer.
accountTypeName - Type String.
#
SetAggWeight
Sets a Member's aggregation weight by passing a Dimension name or abbreviation, the Member name, and the new weight.
How To Use
SetAggWeight(dimNameOrAbbr As String, mbrName As String, parentName As String, weight As Decimal)
# Parameters
dimNameOrAbbr - Type String.
mbrName - Type String.
parentName - Type String.
weight - Type Decimal.
# Example
# Results
UpdateDesc
Updates a Member's description by passing a Dimension name or abbreviation, the Member name, and its new description.
How To Use
Function |
---|
UpdateDesc(dimensionNameOrAbbr As String, memberName As String, description As String) As Global.OneStream.Shared.Wcf.MemberInfo |
UpdateDesc(dimensionNameOrAbbr As String, memberId As Integer, description As String) As Global.OneStream.Shared.Wcf.MemberInfo |
UpdateDesc(dimensionNameOrAbbr As String, memberName As String, description As String) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
description - Type String.
# Example
# Results
UpdateDesc(dimensionNameOrAbbr As String, memberId As Integer, description As String) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
memberId - Type Integer.
description - Type String.
#
UpdateText
# Single Text Property
Updates a Member's text field value by passing a Dimension name or abbreviation, the Member name, the text number (1 through 8), and the updated value.
Note that this method does not support varying Time and Scenario dimensions or in-built dimensions like View and Origin.
How To Use
UpdateText(dimensionNameOrAbbr As String, memberName As String, number As Integer, value As String)
# Parameters
dimensionNameOrAbbr - Type String.
memberName - Type String.
number - Type Integer.
value - Type Integer.
# Example
# Results
# Update Member Text Fields (Text1 to 8)
All Text properties can be updated in a single line, using a position-dependent comma-delimited list of Text properties in addition to the Dimension name and Member name.
Six notes:
-
This method does not support varying Time and Scenario dimensions or in-built dimensions like View and Origin..
-
Trailing Text properties need not be included in the method's parameters, e.g., do not pass a value for Text3 onwards if only the first two are updated.
-
When updating some but not all Text properties, skip the parameter by jumping to the next parameter, e.g., "Text1 value", "Text2 value",,"Text4 value".
-
Clear a Text property by using an empty double quote for that property, e.g., "".
-
A Dimension abbreviation can be used in lieu of a Dimension name.
[After Text8 you may input a Scenario type and time name]{.underline}
How To Use
UpdateText(dimensionNameOrAbbr As String, memberName As String, Optional txt1 As String = \"\", Optional txt2 As String = \"\", Optional txt3 As String = \"\", Optional txt4 As String = \"\", Optional txt5 As String = \"\", Optional txt6 As String = \"\", Optional txt7 As String = \"\", Optional txt8 As String = \"\", Optional scenarioTypeName As String = \"\", Optional timeName As String = \"\") As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
Type - Type String.
# Example
# Results
XI. Relationships
Use Cases
Querying the relational structure of members is important to understand where a member is in the overall hierarchy and how that position may affect logic regarding children and parents.
FirstbaseDescendant
Retrieves first descendant base member name.
How To Use
FirstBaseDescendant(dimensionNameOrAbbr As String, childName As String, Optional excludeNone As Boolean = False) As String
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
excludeNone - Type Boolean. Optional. Default is False. Set to True to *include* None in result set.
# Example
# Results
FirstBaseDescendantMember
Retrieves first descendant base member object.
How To Use
FirstBaseDescendantMember(dimensionNameOrAbbr As String, childName As String, Optional excludeNone As Boolean = False) As Member
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
excludeNone - Type Boolean. Optional. Default is False. Set to True to *include* None in result set.
# Example
# Results
FirstBaseDescendantMemberInfo
Retrieves first descendant base member info object.
How To Use
FirstBaseDescendantMemberInfo(dimensionNameOrAbbr As String, memberName As String, Optional excludeNone As Boolean = False) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
excludeNone - Type Boolean. Optional. Default is False. Set to True to *include* None in result set.
# Example
# Results
FirstChildMember
Retrieves first child member name.
How To Use
FirstChildMember(dimensionNameOrAbbr As String, childName As String, Optional excludeNone As Boolean = False) As Global.OneStream.Shared.Common.Member
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
excludeNone - Type Boolean. Optional. Default is False. Set to True to *include* None in result set.
# Example
# Results
FirstChildMemberInfo
Retrieves first child member info object.
How To Use
FirstChildMemberInfo(dimensionNameOrAbbr As String, memberName As String, Optional excludeNone As Boolean = False) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
excludeNone - Type Boolean. Optional. Default is False. Set to True to *include* None in result set.
# Example
# Results
FirstParentMember
Retrieves first parent member name.
How To Use
FirstParentMember(dimensionNameOrAbbr As String, childName As String) As Member
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
# Example
# Results
FirstParentMemberInfo
Retrieves first parent member info object.
How To Use
FirstParentMemberInfo(dimensionNameOrAbbr As String, childName As String) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
# Example
# Results
FirstParent
Retrieves first parent name. Functionally equivalent to FirstParentName.
How To Use
FirstParent(dimensionNameOrAbbr As String, childName As String) As String
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
# Example
# Results
FirstParentName
Retrieves first parent name. Functionally equivalent to FirstParent.
How To Use
FirstParentName(dimensionNameOrAbbr As String, childName As String) As String
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
# Example
# Results
NextSiblingMember
Retrieves next sibling member name.
How To Use
NextSiblingMember(dimensionNameOrAbbr As String, childName As String, Optional commonParentName As String = \"\") As Member
Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
commonParentName - Type String. Optional. Used to specify a parent to find the next sibling. Otherwise, if left blank, it will default to using the first parent to find the next sibling.
# Example
# Results
NextSiblingMemberInfo
Retrieves next sibling member info object.
How To Use
NextSiblingMemberInfo(dimensionNameOrAbbr As String, childName As String, Optional commonParentName As String = \"\") As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
commonParentName - Type String. Optional. Used to specify a parent to find the next sibling. Otherwise, if left blank, it will default to using the first parent to find the next sibling.
# Example
# Results
NextSibling
Retrieves next sibling name.
How To Use
NextSibling(dimensionNameOrAbbr As String, childName As String, Optional commonParentName As String = \"\") As String
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
commonParentName - Type String. Optional. Used to specify a parent to find the next sibling. Otherwise, if left blank, it will default to using the first parent to find the next sibling.
# Example
# Results
PriorSibling
Retrieves prior sibling name.
How To Use
PriorSibling(dimensionNameOrAbbr As String, childName As String, Optional commonParentName As String = \"\") As String
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
commonParentName - Type String. Optional. Used to specify a parent to find the next sibling. Otherwise, if left blank, it will default to using the first parent to find the next sibling.
# Example
# Results
PriorSiblingMember
Retrieves prior sibling member object.
How To Use
PriorSiblingMember(dimensionNameOrAbbr As String, childName As String, Optional commonParentName As String = \"\") As Member
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
commonParentName - Type String. Optional. Used to specify a parent to find the next sibling. Otherwise, if left blank, it will default to using the first parent to find the next sibling.
# Example
# Results
PriorSiblingMemberInfo
Retrieves prior sibling member info object.
How To Use
PriorSiblingMemberInfo(dimensionNameOrAbbr As String, childName As String, Optional commonParentName As String = \"\") As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
commonParentName - Type String. Optional. Used to specify a parent to find the next sibling. Otherwise, if left blank, it will default to using the first parent to find the next sibling.
# Example
# Results
IsAncestor / IsAnc
Checks if member is ancestor of other member.
How To Use
IsAncestor(dimensionNameOrAbbr As String, ancestorName As String, descendantName As String, Optional onlyLookInSameExtendedDimension As Boolean = False) As Boolean
IsAnc(dimensionNameOrAbbr As String, ancestorName As String, descendantName As String, Optional onlyLookInSameExtendedDimension As Boolean = False) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
ancestorName - Type String.
descendantName - Type String.
onlyLookInSameExtendedDimension - Type Boolean. Optional. Set to True to make function check if parent and child members have the same DimTypeID.
# Example
# Results
IsBase
Checks if member is base member of other member.
How To Use
IsBase(dimensionNameOrAbbr As String, descendantName As String, ancestorName As String, Optional onlyLookInSameExtendedDimension As Boolean = False) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
descendantName - Type String.
ancestorName - Type String.
onlyLookInSameExtendedDimension - Type Boolean. Optional. Set to True to make function check if parent and child members have the same DimTypeID.
# Example
# Results
IsChild
Checks if member is child of other member.
How To Use
IsChild(dimensionNameOrAbbr As String, childName As String, parentName As String, Optional onlyLookInSameExtendedDimension As Boolean = False) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
childName - Type String.
parentName - Type String.
onlyLookInSameExtendedDimension - Type Boolean. Optional. Set to True to make function check if parent and child members have the same DimTypeID.
# Example
# Results
IsDescendant / IsDesc
Checks if member is descendant of other member.
How To Use
IsDescendant(dimensionNameOrAbbr As String, descendantName As String, ancestorName As String, Optional onlyLookInSameExtendedDimension As Boolean = False) As Boolean
IsDesc(dimensionNameOrAbbr As String, descendantName As String, ancestorName As String, Optional onlyLookInSameExtendedDimension As Boolean = False) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
descendantName-- Type String.
ancestorName - Type String.
onlyLookInSameExtendedDimension - Type Boolean. Optional. Set to True to make function check if parent and child members have the same DimTypeID.
# Example
# Results
IsParent
Checks if member is parent of other member.
How To Use
IsParent(dimensionNameOrAbbr As String, parentName As String, childName As String, Optional onlyLookInSameExtendedDimension As Boolean = False) As Boolean
# Parameters
dimensionNameOrAbbr - Type String.
parentName - Type String.
childName - Type String.
onlyLookInSameExtendedDimension - Type Boolean. Optional. Set to True to make function check if parent and child members have the same DimTypeID.
# Example
# Results
IsSibling
Checks if member is sibling of other member.
How To Use
IsSibling(dimensionAbbr As String, memberName As String, siblingName As String, Optional commonDimension As String = \"\") As Boolean
# Parameters
dimensionAbbr - Type String.
memberName - Type String.
siblingName - Type String.
commonDimension - Type String. Optional. Specify common dimension to check against. Default attempts to extract dimension from dimensionAbbr parameter.
# Example
# Results
XII. Strings & Text
Use Cases
String manipulation is an integral part of Business Rules. These functions help simplify commonly used String processing.
EscapeCharacters
Adds specified escape character to specified characters.
How To Use
EscapeCharacters(inputString As String, escapeCharacter As String, ParamArray charsToEscape As String()) As String
# Parameters
inputString - Type String.
escapeCharacter - Type String.
charsToEscape - Type String(). Takes an arbitrary number of comma-separated input parameters.
# Example
# Results
FormatMixedCaseSingleWordAsWords
Formats mixed case single word and separates them into separate, spaced words.
How To Use
FormatMixedCaseSingleWordAsWords(inputString As String, Optional replaceUnderscores As Boolean = False) As String
# Parameters
inputString - Type String.
replaceUnderscores - Type Boolean. Optional. Option to replace underscore character "_" with spaces as well.
# Example 1 - replaceUnderscores not set (defaults to False)
# Results
# Example 2 - replaceUnderscores set to True
# Results
RemovePrefix
Removes specified prefix from input String.
How To Use
RemovePrefix(inputString As String, prefixToRemove As String, Optional ignoreCase As Boolean = False) As String
# Parameters
inputString - Type String.
childName - Type String.
prefixToRemove - Type String.
ignoreCase - Type Boolean. Optional. Set to True to make prefix ignore case during comparison. Default is False.
# Example
# Results
RemoveSpecialCharacters
Removes any character that is not alphanumeric or underscore (A-Z, a-z, 0-9, _ are the only valid characters).
How To Use
RemoveSpecialCharacters(inputString As String) As String
# Parameters
inputString - Type String.
# Example
# Results
RemoveSuffix
Removes specified suffix from input String.
How To Use
RemoveSuffix(inputString As String, suffixToRemove As String, Optional ignoreCase As Boolean = False) As String
# Parameters
inputString - Type String.
suffixToRemove - Type String.
ignoreCase - Type Boolean. Optional. Set to True to make suffix ignore case during comparison. Default is False.
# Example
# Results
RepeatString
Repeats input string a specified number of times.
How To Use
RepeatString(numberOfTimes As Integer, stringToRepeat As String) As String
# Parameters
numberOfTimes - Type Integer. Specify number of times to repeat stringToRepeat parameter in output.
stringToRepeat - Type String.
# Example
# Results
ReplaceAny
Replaces any instance of specified String with another specified value.
How To Use
ReplaceAny(Of T)(value As T, replaceWith As T, ignoreCase As Boolean, ParamArray collectionValues As T()) As String
# Parameters
value - Type T. Input String that will have its values replaced.
replaceWith - Type T. String that will replace values specified by collectionValues parameter(s).
ignoreCase - Type Boolean.
collectionValues - Type T(). Takes an arbitrary number of comma-separated input parameters.
# Example 1 - ignoreCase set to True
# Results
# Example 2 - ignoreCase set to False
# Results
ReplaceIgnoreCase
Case-insensitive replacement of characters in input String.
How To Use
ReplaceIgnoreCase(inputString As String, replaceText As String, withText As String) As String
# Parameters
inputString - Type String.
replaceText - Type String.
withText - Type String.
# Example
# Results
XFBR
Calls XFBR via name and function.
For the following examples of this function's use, the following sample XFBR is used:
How To Use
Function |
---|
XFBR(ByVal ruleName As String, ByVal functionName As String) |
XFBR(ByVal ruleName As String, ByVal functionName As String, subVars As Dictionary(Of String, String)) |
XFBR(ByVal ruleName As String, ByVal functionName As String)
# Parameters
ruleName - Type String.
functionName - Type String.
# Example
# Results
XFBR(ByVal ruleName As String, ByVal functionName As String, subVars As Dictionary(Of String, String))
# Parameters
ruleName - Type String.
functionName - Type String.
subVars - Type Dictionary(Of String, String).
# Example
# Results
#
XIII. Time
Use Cases
OneStream's Time Dimension is special: it is mandatory, fixed in purpose, interacts with Account types, drives Workflow, defines Data Units, and while fixed in structure, constantly moves forward.
Its properties are key to data loads, calculations, and reporting.
GetCubeStartDate
Returns the current Cube start date for the currently selected Workflow Cube POV. An explicit Cube name can also be defined.
How To Use
GetCubeStartDate(Optional cubeName As String = \"\")
# Parameters
cubeName - Type String. Optional. Defaults to current Workflow POV.
# Example
# Results
GetDaysInPeriod
Returns the number of days in a period based on the currently selected Workflow Cube POV as an Integer. An explicit Cube name can also be defined.
How To Use
Function |
---|
GetDaysInPeriod(Optional periodName As String = \"\", Optional cubeName As String = \"\") |
GetDaysInPeriod(Optional periodId As Integer = 0, Optional cubeName As String = \"\") |
GetDaysInPeriod(Optional periodName As String = \"\", Optional cubeName As String = \"\")
# Parameters
periodName - Type String.
cubeName - Type String. Optional. Defaults to current Workflow POV.
# Example
M1 = Jan
# Results
GetDaysInPeriod(Optional periodId As Integer = 0, Optional cubeName As String = \"\")
# Parameters
periodId - Type Integer.
cubeName - Type String. Optional. Defaults to current Workflow POV.
#
GetGlobalTimeID
Returns the current global time Member ID as an integer.
How To Use
GetGlobalTimeId()
# Example
# Results
GetGlobalTime
Returns the current global time as String.
How To Use
GetGlobalTime()
GetListOfPeriodsBetweenPeriods
Returns a List(Of String) of Time periods within a range.
There are three overload properties:
1) Inclusive Boolean (default is True)
2) Include T## prefix
3) Return MemberIds - T## prefix property is ignored
How To Use
GetListOfPeriodsBetweenPeriods(startPeriod As Object, endPeriod As Object, Optional inclusive As Boolean = True, Optional includePrefix As Boolean = False, Optional returnIDsInsteadOfNames As Boolean = False)
# Parameters
startPeriod - Type Object. Formatted time period object.
endPeriod - Type Object. Formatted time period object.
inclusive - Type Boolean. Optional. Option to include start period and end period date in list. Default is True.
includePrefix - Type Boolean. Optional. Include T## in output string. Default is False.
returnIDsInsteadOfNames - Type Boolean. Optional. Return memberIds instead of T## String. Default is False.
# Example
# Results
GetListOfPeriodsBetweenPeriodsAsSingleString
Returns a list of comma-delimited Time periods between a start period and an end period.
There are three overload properties:
1) Inclusive Boolean (default is True)
2) Include T## prefix
3) Return MemberIds - T## prefix property is ignored
How To Use
GetListOfPeriodsBetweenPeriodsAsSingleString(startPeriod As Object, endPeriod As Object, Optional inclusive As Boolean = True, Optional includePrefix As Boolean = False, Optional returnIDsInsteadOfNames As Boolean = False) As String
# Parameters
startPeriod - Type Object. Formatted time period object.
endPeriod - Type Object. Formatted time period object.
inclusive - Type Boolean. Optional. Option to include start period and end period date in list. Default is True.
includePrefix - Type Boolean. Optional. Include T## in output string. Default is False.
returnIDsInsteadOfNames - Type Boolean. Optional. Return memberIds instead of T## String. Default is False.
# Example
# Results
GetNextPeriodsList
Returns a list of comma-delimited non-inclusive future Time periods based on a start Time period and the number of future periods.
There are three overload properties:
1) Delimiter string, e.g., " ; "
2) Prefix string, e.g., "T##"
3) Suffix string, e.g., ":V##Periodic"
How To Use
GetNextPeriodsList(inputTime As Object, Optional periodsForward As Integer = 1, Optional delimiter As String = \",\", Optional prefix As String = \"\", Optional suffix As String = \"\")
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of next periods to retrieve.
delimiter - Type String. Optional. Used to specify period delimiter. Default is ",".
prefix - Type String. Optional. Used to specify period prefix. Default is nothing.
suffix - Type String. Optional. Used to specify period suffix. Default is nothing.
# Example
# Results
GetPriorPeriodsList
Returns a list of comma-delimited non-inclusive prior Time periods based on a start Time period and the number of prior periods.
How To Use
GetPriorPeriodsList(inputTime As Object, Optional periodsBack As Integer = 1, Optional delimiter As String = \",\", Optional prefix As String = \"\", Optional suffix As String = \"\")
# Parameters
inputTime - Type Object. Formatted time period object.
periodsBack - Type Integer. Number of prior periods to retrieve.
delimiter - Type String. Optional. Used to specify period delimiter. Default is ",".
prefix - Type String. Optional. Used to specify period prefix. Default is nothing.
suffix - Type String. Optional. Used to specify period suffix. Default is nothing.
# Example
# Results
GetNextPeriodsScriptList
As GetNextPeriodsList -- returns a list of comma-delimited non-inclusive future Time periods based on a start Time period and the number of future periods - but with T## as a prefix. This reduces the number of overload properties to the delimiter and suffix.
How To Use
GetNextPeriodsScriptList(inputTime As Object, Optional periodsForward As Integer = 1)
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of next periods to retrieve. Optional. Default is 1 period forward.
# Example
# Results
GetPriorPeriodsScriptList
As GetPriorPeriodsList - returns a list of comma-delimited non-inclusive prior Time periods based on a start Time period and the number of prior periods - but with T## as a prefix. This reduces the number of overload properties to the delimiter and suffix.
How To Use
GetPriorPeriodsScriptList(inputTime As Object, Optional periodsBack As Integer = 1)
inputTime - Type Object. Formatted time period object.
periodsBack - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
# Example
# Results
GetNextPeriodsID
Returns a future Time period ID given an initial Time period and the offset next periods number.
How To Use
GetNextPeriodsID(inputTime As Object, Optional periodsForward As Integer = 1, Optional spanYears As Boolean = True) As Integer
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetNextPeriodsMember
Returns a future Time period Member given an initial Time period and the offset next periods number.
How To Use
GetNextPeriodsMember(inputTime As Object, Optional periodsForward As Integer = 1, Optional spanYears As Boolean = True) As Global.OneStream.Shared.Common.Member
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetNextPeriodsMemberInfo
Returns a future Time period MemberInfo given an initial Time period and the offset next periods number.
How To Use
GetNextPeriodsMemberInfo(inputTime As Object, Optional periodsForward As Integer = 1, Optional spanYears As Boolean = True) As Global.OneStream.Shared.Wcf.MemberInfo
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetNextPeriods
Returns a future Time period Member name given an initial Time period and the offset next periods number.
How To Use
GetNextPeriods(inputTime As Object, Optional periodsForward As Integer = 1, Optional spanYears As Boolean = True) As String
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetNextPeriodsScript
Returns a future Time period Member with a prefixed "T##" given an initial Time period and the offset next periods number.
How To Use
GetNextPeriodsScript(inputTime As Object, Optional periodsForward As Integer = 1, Optional spanYears As Boolean = True) As String
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetPriorPeriodsID
Returns a prior Time period id given an initial Time period and the offset prior periods number.
How To Use
GetPriorPeriodsID(inputTime As Object, periodsBack As Integer, Optional spanYears As Boolean = True) As Integer
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
#
GetPriorPeriodsMember
Returns a prior Time period Member given an initial Time period and the offset prior periods number.
How To Use
GetPriorPeriodsMember(inputTime As Object, Optional periodsBack As Integer = 1, Optional spanYears As Boolean = True) As Global.OneStream.Shared.Common.Member
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetPriorPeriods
Returns a prior Time period name given an initial Time period and the offset prior periods number.
How To Use
GetPriorPeriods(inputTime As Object, Optional periodsBack As Integer = 1, Optional spanYears As Boolean = True) As String
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetPriorPeriodsScript
Returns a prior Time period Member with a prefixed "T##" given an initial Time period and the offset prior periods number.
How To Use
GetPriorPeriodsScript(inputTime As Object, Optional periodsBack As Integer = 1, Optional spanYears As Boolean = True) As String
# Parameters
inputTime - Type Object. Formatted time period object.
periodsForward - Type Integer. Number of prior periods to retrieve. Optional. Default is 1 period back.
spanYears - Type Integer. Optional. Default is True.
# Example
# Results
GetPeriodEndDate
Returns the end date for a specific period as a DateTime object, e.g., 2011M1 will return the DateTime object with the date 1/31/2011.
How To Use
Function |
---|
GetPeriodEndDate(Optional periodName As String = \"\", Optional cubeName As String = \"\") |
GetPeriodEndDate(Optional periodId As Integer = 0, Optional cubeName As String = \"\") |
GetPeriodEndDate(Optional periodName As String = \"\", Optional cubeName As String = \"\")
# Parameters
periodName - Type String. Optional. Defaults to current Workflow POV.
cubeName - Type String. Optional. Defaults to current Workflow POV.
# Example
# Results
GetPeriodEndDate(Optional periodId As Integer = 0, Optional cubeName As String = \"\")
# Parameters
periodId - Type Integer. Optional. Defaults to current Workflow POV.
cubeName - Type String. Optional. Defaults to current Workflow POV.
# Example
# Results
GetPeriodStartDate
Returns the start date for a specific period as a DateTime object, e.g., 2011M1 will return the DateTime object with the date 1/1/2011.
How To Use
Function |
---|
GetPeriodStartDate(Optional periodName As String = \"\", Optional cubeName As String = \"\") |
GetPeriodStartDate(Optional periodId As Integer = 0, Optional cubeName As String = \"\") |
GetPeriodStartDate(Optional periodName As String = \"\", Optional
cubeName As String = \"\")
# Parameters
periodName - Type String. Optional. Defaults to current Workflow POV.
cubeName - Type String. Optional. Defaults to current Workflow POV.
# Example
# Results
GetPeriodStartDate(Optional periodName As String = \"\", Optional cubeName As String = \"\")
# Parameters
periodId - Type Integer. Optional. Defaults to current Workflow POV.
cubeName - Type String. Optional. Defaults to current Workflow POV.
# Example
# Results
SetGlobalTimeId
Sets the global time by providing a time Member ID.
How To Use
SetGlobalTimeId(id As Integer)
# Parameters
id - Type Integer. Valid time object Id.
# Example
# Results
SetGlobalTime
Sets the global time by providing a period name as a String.
How To Use
SetGlobalTime(name As String)
# Parameters
name - Type String. Valid time object name.
# Example
# Results
XIV. Transformation & Lookup
Use Cases
Used to lookup and query transformations from Source to Target.
TransformLookup
Within Lookup Transformation Rules, returns Target Value given a Source Value.
How To Use
TransformLookup(xformRuleName As String, inputValue As String, Optional passthrough As Boolean = False) As String
# Parameters
xformRuleName - Type String.
inputValue - Type String.
passThrough - Type Boolean. Optional. If set to True, evaluates look up and returns inputValue parameter if lookup is unsuccessful. Default is False.
# Example 1
# Results
# Example 2 With optionalPassThrough value as True
# Results
XV. VB.Net & Advanced Coding
Use Cases
When programmatically converting business logic or doing complex tasks in OneStream, figuring out algorithms for certain solutions can be tricky. The collection of functions in this section can make some programming work simple.
DoubleDelimitedLineToDictionary
Creates a dictionary with a mapped key to value by feeding a string formatted as: A=B, C=D, etc. Additional parameters are also available for: delimiter identification within the string separating each key; the assigning operator for the mapped key to value; allowing special characters within brackets; removing brackets after assignment; and reversing key value pairs.
How To Use
DoubleDelimitedLineToDictionary(inputString As String, Optional delimiter1 As String = \",\", Optional delimiter2 As String = \"=\", Optional sortKeys As Boolean = False, Optional useOneStreamBracketsAsQuotedText As Boolean = False, Optional stripOneStreamBracketsOff As Boolean = False, Optional reverseKeyAndValue As Boolean = False, Optional sortReverse As Boolean = False) As Dictionary(Of String, String)
# Parameters
Delimiter1 - Type String. TypeString that delimits Key-Value pairs from one another. Default is ",".
Delimiter2 - Type String. String that delimits Key from Value. Default is "=".
Sortkeys - Type Boolean. Sorts keys alphabetically in Ascending order in output dictionary. Default is False.
useOneStreamBracketsAsQuotedText - Type Boolean.Preserves text within bracket as singular quoted String to prevent parsing within brackets. Default is False.
stripOneStreamBracketsOff - Type Boolean.Removes brackets when inserting into dictionary. Default is False.
ReverseKeyAndValue - Type Boolean.Parse Key-Value pair as Value-Key. Default is False.
SortReverse - Type Boolean.Sorts keys alphabetically in Descending order in output dictionary. Default is False.
# Example 1 - No optional parameters specified.
# Results
# Example 2 - Delimiter1 specified.
# Results
# Example 3 - Delimiter2 specified.
# Results
# Example 4 - Sortkeys specified.
# Results
# Example 5 - useOneStreamBracketsAsQuotedtext set to True.
# Results
# Example 6 - stripOneStreamBracketsOff set to True.
# Results
DataCellPkToMemberScript
Converts a DataCellPk object to a raw Member Script string by grabbing the POV information within the object.
How To Use
DataCellPkToMemberScript(dcpk As DataCellPk, Optional ignoreNones As Boolean = False) As MemberScriptBuilder
# Parameters
dcpk - Type OneStream.Shared.Common.DataCellPk.
ignoreNones - Type Boolean. Removes dimensions which resolve to "None". Default is False.
# Example 1 - No optional parameters specified.
# Results
# Example 2 - ignoreNones set to True.
# Results
DelimitedLineToList
Converts a delimited string list to a list object making declaration of a list flexible through string inputs.
How To Use
DelimitedLineToList(inputString As String, delimiter As String, Optional useOneStreamBracketsAsQuotedText As Boolean = False, Optional sort As Boolean = False, Optional sortReverse As Boolean = False) As List(Of String)
# Parameters
inputString - Type String.
delimiter-- Type String.
useOneStreamBracketsAsQuotedText - Type Boolean. Preserves text within bracket as singular quoted String to prevent parsing within brackets. Default is False.
sort - Type Boolean. Sorts list contents alphabetically in Ascending order in output list. Default is False..
SortReverse - Type Boolean. Sorts list contents alphabetically in Descending order in output list. Default is False.
# Example 1 - No optional parameters specified
# Results
# Example 2 - useOneStreamBracketsAsQuotedText set to True.
# Results
# Example 3 - Sort set to True.
# Results
# Example 3 - SortReverse set to True.
# Results
SortDictionaryByKey
Sorts an existing dictionary by its key.
How To Use
SortDictionaryByKey(unsortedDictionary, Optional reverse = False)
# Parameters
unsortedDictionary - Type Dictionary(Of String, String).
Reverse - Type Boolean. Sorts dictionary keys alphabetically in Descending order in output list. Default is False.
# Example 1 - No optional parameters specified.
# Results
# Example 2 - Reverse set to True.
# Results
SortDictionaryByValue
Sorts an existing dictionary by its values.
How To Use
SortDictionaryByValue(unsortedDictionary, Optional reverse = False)
# Parameters
unsortedDictionary - Type Dictionary(Of String, String).
Reverse - Type Boolean. Sorts dictionary keys alphabetically in Descending order in output list. Default is False.
#
GetEnumID
Retrieves an Enum value corresponding to its name through string input.
How To Use
GetEnumID(enum As Type, name As String)
# Parameters
enum - Type Type.
name - Type String.
# Example
# Results
ConvertListToDictionary
Converts a list to a dictionary by taking its values and declaring both key and value pairs as the same value.
How To Use
ConvertListToDictionary(Of TValue)(sourceList As List(Of TValue), Optional sort As Boolean = False, Optional reverse As Boolean = False) As System.Object
# Parameters
childName - Type String.
sort - Type Boolean. Sorts list contents alphabetically in Ascending order in output list. Default is False..
reverse - Type Boolean. Sorts list contents alphabetically in Descending order in output list. Default is False. Note that this parameter only is valid if sort parameter is also set to True.
# Example 1 - No parameters specified.
# Results
# Example 2 - Sort set to True
# Results
# Example 3 - Sort set to True. Reverse set to True.
# Results
UniqueList
Removes duplicate values in a list. As an example, this can be useful for removing duplicate Members from alternate hierarchies in a String list retrieved by a different function.
How To Use
UniqueList(Of TValue)(inputList As List(Of TValue), Optional sorted As Boolean = False, Optional [direction] As String = \"asc\") As List(Of TValue)
# Parameters
inputList - Type List.
sorted - Type Boolean. Optional. Sorts list contents alphabetically based on option set by "[direction]" parameter. Default is False.
direction - Type String. Optional. Specifies type of sort. If user specifies "Desc", then output will be sorted alphabetically in Descending order. Defaults to "asc" for Ascending sort. This parameter does nothing unless "sorted" is also set to True.
# Example 1 - No parameters specified.
# Results
# Example 2 - Sorted set to True.
# Results
# Example 3 - Sorted set to True. direction set to "Desc"
# Results
SortList
Sorts a list object's items alphabetically.
How To Use
SortList(Of TValue)(listToBeSorted As List(Of TValue), Optional [direction] As String = \"asc\") As List(Of TValue)
# Parameters
listToBeSorted - Type List.
[direction] - Type String. Optional. Specifies type of sort. If user specifies "Desc", then output will be sorted alphabetically in Descending order. Defaults to "asc" for Ascending sort.
# Example 1
# Results
# Example 2 - direction set to "Desc"
# Results
MemberScriptToDataCellPk
Converts a Member Script POV to a data cell pk for use in other functions.
How To Use
Function |
---|
MemberScriptToDataCellPk(script As String) As DataCellPk |
MemberScriptToDataCellPk(msb As MemberScriptBuilder) As DataCellPk |
MemberScriptToDataCellPk(script As String) As DataCellPk
# Parameters
script - Type formatted Member Script String.
# Example
# Results
MemberScriptToDataCellPk(msb As MemberScriptBuilder) As DataCellPk
# Parameters
msb - Type OneStream.Shared.Wcf.MemberScriptBuilder.
# Example
# Results
ExecuteMethodByReflection
Executes API methods by feeding strings and parameters.
How To Use
ExecuteMethodByReflection(obj As Object, objType As Type, methodName As String, args As Object(), Optional argTypes As Type() = Nothing) As Object
# Parameters
obj - Type Object.
objType - Type Type.
methodName - Type String.
args - Type Object().
argTypes - Type Object().
# Example
Existing ErrorLog item:
Using ExecuteMethodByReflection to call ErrorLogWcf.GetErrorLogItem():
# Results
SetPropertyByReflection
Sets properties for objects by feeding strings and parameters.
How To Use
SetPropertyByReflection(obj As Object, propertyName As String, propertyValue As Object) As Object
# Parameters
propertyName - Type String.
propertyValue - Type Object.
# Example
# Results
GetStateObject
Retrieves the state object for the current OneStream session.
How To Use
GetStateObject(mode As String, textKey As String, binaryKey As String) As Object
# Parameters
mode - Type String. Three valid modes:
-
"User" : Stores state at User level
-
"Session" : Stores state at Session level
"Page" : Stores state at Page level
textKey - Type String.
binaryKey - Type String.
# Example
# Results
GetStateText
Retrieves text in the session state object.
How To Use
GetStateText(mode As String, textKey As String, binaryKey As String) As String
# Parameters
mode - Type String. Three valid modes:
-
"User" : Stores state at User level
-
"Session" : Stores state at Session level
"Page" : Stores state at Page level
textKey - Type String.
binaryKey - Type String.
# Example
# Results
SetStateObject
Sets the and object in the session state with a given key.
How To Use
SetStateObject(mode As String, binaryKey As String, binaryObject As Object)
# Parameters
mode - Type String. Three valid modes:
-
"User" : Stores state at User level
-
"Session" : Stores state at Session level
"Page" : Stores state at Page level
textKey - Type String.
binaryKey - Type String.
# Example
# Results
SetStateText
Sets text in the session state object with a given key.
How To Use
SetStateText(mode As String, textKey As String, textValue As String)
# Parameters
mode - Type String. Three valid modes:
-
"User" : Stores state at User level
-
"Session" : Stores state at Session level
"Page" : Stores state at Page level
textKey - Type String.
binaryKey - Type String.
# Example
# Results
XVI. Workflow & Global Settings
Use Cases
Most things in OneStream are driven from the Workflow, this section provides a collection of functions to get Workflow information in a simple manner.
GetGlobalScenarioId
Retrieves the global Scenario ID.
How To Use
GetGlobalScenarioId()
# Example
# Results
GetGlobalTimeId
Retrieves the global time ID.
How To Use
GetGlobalTimeId()
# Example
# Results
GetWFAttribute
Retrieves a specified Workflow attribute given a field name, Scenario type, and profile name.
The selected Workflow profile through OnePlace is referenced if the profile name is not explicitly input.
Possible WFAttributes to choose from:
ProfileDescription
WorkflowChannel
Workflow
WorkflowExecutionGroup
WorkspaceDashboardWorkflow
Active
NamedDependents
DataSource
IsOptionalLoad
InsertType
CanLoadUnrelatedEntities
FlowNoDataZeroViewOverride
BalanceNoDataZeroViewOverride
ForceBalanceAccountsToYTDView
CachePageSize
CachePagesInMemoryLimit
UseDetailedLogging
TransformationProfile
ImportDashboardProfile
ValidateDashboardProfile
JournalTemplateProfile
JournalProcessGroup
JournalApprovalGroup
JournalPostGroup
InputFormsProfile
LoadOverlappedSiblings
ICMatchingEnabled
ICMatchingParameters
CubeViewProfile
ProcessCubeDashboardProfile
ConfirmationProfile
ConfirmationDashboardProfile
CertificationProfile
CertificationSignOffGroup
CertificationDashboardProfile
LimitToDefaults
DefaultLoadMethod
BiBlendParameters
Text1
Text2
Text3
Text4
How To Use
GetWFAttribute(attributeNameOrId As Object, Optional scenarioTypeNameOrId As Object = \"\", Optional wfNameOrId As Object = \"\", Optional useDefaultValue As Boolean = False) As String
# Parameters
attributeNameOrId - Type String.
scenarioTypeNameOrId - Type String. Optional. Defaults to current workflow POV.
wfNameOrId - Type String. Optional. Defaults to current workflow POV.
useDefaultValue - Type Boolean. Optional. If set to True, default value for attribute will return in the case that the attribute has no value. Defaults to False.
# Example
# Results
GetWFCubeName
Retrieves the currently set Workflow Cube name.
How To Use
GetWFCubeName() As String
# Example
# Results
GetWFName
Retrieves the currently selected Workflow name.
How To Use
GetWFName() As String
# Example
# Results
GetWFProfileShortName
Retrieves a shorthand name of the selected Workflow.
How To Use
GetWFProfileShortName() As String
# Example
# Results
GetWFScenarioId
Retrieves the currently selected Scenario ID designated by the Workflow POV.
How To Use
GetWFScenarioId() As Integer
# Example
# Results
GetWFScenarioName
Retrieves the currently selected Scenario name designated by the Workflow POV.
How To Use
GetWFScenarioName() As String
# Example
# Results
GetWFYear
Retrieves the currently selected Workflow year designed by the Workflow POV.
How To Use
GetWFYear() As Integer
# Example
# Results
SetGlobalScenario
Sets the global Scenario on the Cube POV.
How To Use
SetGlobalScenario(name As String)
# Parameters
name - Type String.
# Example
# Results
SetGlobalTimeId
Sets the global time by providing a time Member ID.
How To Use
SetGlobalTimeId(id As String)
# Parameters
id - Type String.
# Example
# Results
SetGlobalTime
Sets the global time by providing a time Member name.
How To Use
SetGlobalTime(name As String)
# Parameters
name - Type String.
# Example
# Results
SetWFAttribute
Sets a Workflow attribute.
As with GetWFAttribute, the function looks to the Workflow currently selected in OnePlace. Manually settings the Workflow profile that you want to change attributes for is also possible by inputting the profile name as the last parameter.
Refer to GetWFAttribute for list of attributes to use.
How To Use
SetWFAttribute(value As Object, name As String, Optional scenarioTypeName As String = \"\", Optional wfName As String = \"\")
# Parameters
value - Type Object.
name - Type String.
scenarioTypeName - Type String. Optional. Defaults to current Workflow POV.
wfName - Type String. Optional. Defaults to current Workflow POV.
# Example
# Results
Data Structures
BDA Simple Code has no data structures.