Discuss formulas and business rules for your application.
Recently active
Hi, I'm trying to learn more about the business Rules and what they are doing. Where can I find the various function implementations. For Example: I have this function Dim connectionString As String = GetConnectionString(si, globals, api) For the GetConnectionString function where is the code for this funciton ? so I can read and understand what its doing ? If this is in the API, I have been looking there today, can you reference which folder / document I can get this. Thanks for your help in advance.
May I have an example of using UserState Parameter in the Api.Data.Calculate? Thank you
Is it possible to copy a value from one cube to another mutually exclusive cube with a Custom Calculate business rule? I am trying to copy a value from the Cb#Financial cube to the Cb#CASH cube. However, using the “api.Data.Calculate” code below I get the error “Invalid destination data unit in script” even though the Data Unit defined in my Data Management step matches the target cube Data Unit.Dim sTops As String = ":C#Local:S#AOP_Final:V#Periodic:A#BGMOPEX:F#EndBal_Input:O#BeforeAdj:I#None:U1#TopUD1:U2#TopUD2:U3#SALARY:U4#TopUD4:U5#TopUD5:U6#TopUD6:U7#None:U8#GC_USD" Dim sNones As String = ":Cb#CASH:E#US01:S#CashForecast_Forecast:T#2024M10:C#Local:V#Periodic:F#EndBal_Input:O#Forms:I#None:U1#None:U2#None:U3#NoVendor:U4#None:U5#None:U6#CashForecast_Plan:U7#None:U8#GC_USD"
Hi All,As the name states above I'm trying to dynamically modify suppression settings on a column in a CV based on a value selected in a parameter. So for example let's say if a user selects an option from a parameter I want to modify suppression settings on certain columns based on that selection choice. I have two questions:Is there a way to do this?If there is a way, how would this business rule/function be passed? In the CV? In the Cube? Thank You...Any assistance on this would be extremely helpful.
Hello, I'm somewhat new to writing code for confirmation rules. I'm trying to create a confirmation that is only for 1 entity and we'd like it in our general rule groups for confirmation rules and not have to create it's own rule profile. Basically we need to the rule to be If WFProfile Entity <> 02140 return True, if not then (enter rule I already created). I couldn't find anything in the documentation about making it entity specific and excluding other entities. Thanks, Will
Hi, Is it possible to attach a file from the public folder to the mail using the function, BRApi.Utilities.SendMail(si, emailConnectionName, toEmailAddresses, subject, body, attachmentFilePaths) Would appreciate any assistance. Thank You.
Hi All, I would like to execute a batch posting of all unposted journals in all base workflow profiles. Is there a way I can execute the posting via business rule? Thank you in advance.
Hi Everyone, has anyone already tried to reference a Workspace Assembly business rule from a Finance or a Connector business rule? I have a business rule that is packaged to an Assembly in a Workspace: It has a set of public functions returning dictionaries and other variables. And I would like these functions being called from a Connector. I can successfully reference it from another Assembly workspace. But when I am using the same syntax in a connector, that is not working: I am assuming the referenced Business rule must be declared in the Properties, but I am not sure of the syntax. Or even sure this is accepted. Many thanks to anyone who can helps!
Hi Community, I try to save a simple data buffer within a Custom Calculate and receive a cryptic error message. Dim sourceDataBuffer1 As New DataBuffer sourceDataBuffer1 = api.Data.GetDataBufferUsingFormula("FilterMembers(C#Local,UD8#None)") sourceDataBuffer1.LogDataBuffer(api,"sourceDataBuffer1",100) Dim resultDataBuffer1 As DataBuffer = New DataBuffer() For Each cell As DataBufferCell In sourceDataBuffer1.DataBufferCells.Values Dim sCell As New DataBufferCell(cell) api.LogMessage(sCell.DataBufferCellPk.GetMemberScript(api)) resultDataBuffer1.SetCell(api.SI, sCell, True) Exit For Next resultDataBuffer1.LogDataBuffer(api,"resultDataBuffer1",100) api.Data.SetDataBuffer(resultDataBuffer1, api.Data.GetExpressionDestinationInfo(String.Empty)) When I start the Custom Calculate from data management, I select a base entity and C#Local, scenario and time. The code will write a log with an usual POV of the cell without common members (line 7) and also log the restultdatabuffer1 with 1 cell
Hello, I setup a filter on a workflow profile calculation to run a data management job as long as the no calculate is the selected option. We have a Data Quality Event Handler Business rule to run this; however when I click on process cube, it's running the job twice at the same time. This is the example of what it's doing when I say it's running twice: Here it the code from the event handler: Namespace OneStream.BusinessRule.DataQualityEventHandler.DataQualityEventHandler Public Class MainClass '------------------------------------------------------------------------------------------------------------ 'Reference Code: DataQualityEventHandler ' 'Description: Event handler method that provides an opertunity to supplement a normal data quality ' action with your own custom functionality. ' (Example: email after ProcessCube or publish report to sharepoint after failed Confirmation). ' 'Usage: Executes when a Data Quality a
Hello everyone, I am experiencing an issue with a dynamic calculation rule in OneStream for a user-defined dimension (UD1) grouping entities. The rule works correctly for all Consolidation dimensions except for "Translated," where the data is not calculated or displayed at the UD1 level, even though the base entities have values for that member. Context: I have a dynamic calculation rule that sums the values of base entities grouped under a UD1. The rule’s logic is the following: Dim entity As String = api.Pov.Entity.Name Dim text5 As String = api.Entity.Text(5) Dim ud1 As String = api.Pov.UD1.Name Dim ud1Man As String = ud1.Substring(1,3) Dim parent As String = "P" & ud1Man Dim result As Decimal = 0.00 'Filter the entities by Text5 Dim entityPk As DimPk = api.Dimensions.GetDim("Entities").DimPk Dim entityList As List(Of MemberInfo) = api.Members.GetMembersUsingFilter(entityPk, "E#PL00.Base.Where(Text5 Contains '" & ud1 &"')", Nothing) 'If we deploy the entities with an
cHi All, good day. I'm using a database connection and it's working good: Dim dt As DataTable = Nothing Dim dbConnApp As DbConnInfo = BRApi.Database.CreateDbConnInfo(_si, Dblocation.External, "OneStream BI Blend")Dim stringSQL As String= "SELECT Entity,UD1_01,UD1_02,UD1_03,UD1_04,UD1_05,UD1_06,UD1_07,UD1_08,UD1_09,UD1_10,UD1_11,UD1_12,UD1_13,UD1_14,UD1_15 from XFC_UD1sbyEnt where Entity = " & "'" & api.Pov.Entity.Name & "' ; "dt = BRapi.Database.ExecuteSql(dbConnApp, stringSQL.ToString, False) but in the error message log have a lot of messages that I need to close the connection Summary: Error in DbConnInfo.~DbConnInfo(). DbConnInfo should be used in a 'using' statement or Close() should be called explicitly. does someone know how should be the command for close the connection? Thanks in advance and best Regards. Mario Guerrero
I need to update the security on a scenario using a dashboard button, is this possible through a dashboard extender rule? Essentially a meeting will take place and certain scenarios will need to be locked down so no one can make changes besides the appropriate security group on the call. I will then need to change it back to the original security settings with a separate button once the meeting is over
Hello OneStream experts: Thank you for the helps in the past. I found this forum is very helpful. I feel the MultiplyUnbalanced function is very nice and wonder if it can take more than 2 components to multiply. They give an example: If I want to do A#UnbalancedMultiplication=A#60000 x A#41000:U2#Parts I can use the following: api.Data.Calculate("A#UnbalancedMultiplication = MultiplyUnbalanced(A#60000, A#41000:U2#Parts, U2#Parts)") But, if I want to do multiply three components A#UnbalancedMultiplication=A#60000 x A#41000:U2#Parts x A#51000:U2#Material how to use the MultiplyUnbalanced function? Thank you in advance for any answers.
Hi all Are there any key short cuts in the business rules editor? Cheers
Hi Everyone. What I want to achieve is to obtain the amount of three times in a single getdatacell. What I have is the following: Dim first As Decimal = api.Data.GetDataCell("S#[" & strScenario & "]:" & timesTest(0) & ":E#30801_30800:A#FINVOLUME:F#None:O#BeforeAdj:U1#D0000:U2#P0100:U3#LOCAL_DATA:U4#PJ00000").CellAmount The issue is that I need to use three different times, but I don’t want to create three variables to sum those values, and I also don’t want to do something like the following: 'Example Dim tot as Decimal = api.Data.GetDataCell("#Time1" + "#Time2" + "#Time3") So, I wanted to see if there is a way to put all the times together in one so that the sum is done internally, or if it can only be done as shown above. I hope you can explain the best method to achieve this.
Hi Team, I would like to fetch and update the Entity Relationship Properties for the Entity Dimension members via Business Rules.The below peace of code works fine for only when I pass the Actual and Budget but when i pass the other scenario Type like Scenariotype 1 to 8 I get the error Object is not set to an instance of an object.Dim Scenario As String = args.CustSubstVarsAlreadyResolved("Param_SecnarioType_EO_24")'The above value i get it from the combo box as delimited list Dim Scenarioid As Integer = BRApi.Finance.Members.GetMemberId(si,dimtype.Scenario.Id,Scenario)Dim MyScenarioTypeid As ScenarioType = BRApi.Finance.Scenario.GetScenarioType(si,Scenarioid)Dim Timefilter As String = args.CustSubstVarsAlreadyResolved("Param_Time_24")Dim Timeid As Integer = BRApi.Finance.Members.GetMemberId(si,dimtype.Time.Id,Timefilter)Can you please help me with the correct way to get the scenario Type.
I have created a literal value parameter for entity that I want to refer in my finance rules for calculation. Can someone share me a code where I can look up values from a parameter I set instead of running a E#Root.base or something. Running a E#Root.base where txt1='value' is not an option . Thanks
Has anyone had success taking a date, say 12/2/2024, and the cube name I assume, and converting it to a period like 2024M12?
Hi Everyone. What I want to do is change the value of: si.WorkflowClusterPk.ProfileKey What I want to change is the ProfileKey of a Profile that can obtain the value by name. I need to make this change to modify a process that relies solely on the information from this attribute. Therefore, I would be grateful for your assistance.
Hello,Does anyone know an effective way to alter the amount column of a table using a SQL script?Use case: the client is bringing in what they call "Production Downtime" to the system, which shows hours of downtime by plant based on a reason (attribute). Using a Dashboard Data Set rule, I created a SQL query to return specific results from the stage table based on Entity and Plant selections. This rule is linked to a data adapter and fed into the BI Viewer.In their BI Viewer report, it shows current Month vs PY Month. Since this data is coming in daily, when the user is looking at the current month, (today is Nov 21) the current month shows 21 days' worth of downtime data. They would like the PY Month to also represent 21 days of data.So, I would like to create a "ratio" variable that reads the current day of month and divides by the total days in month, and multiply the PY data by it. I created something similar in a UD8 calc:(SQL Is not my strong suit) how can I apply this "ratio" to
We are trying to build a one side match rule for AR TXM. Within our DS1, we have transactions that combine and net to zero. We are finding that the one side rule is matching transactions by the amount instead of first summing the group of transactions to zero, which is resulting in incorrect matches. Is there a way to match negative amounts to positive amounts of the same balance (i.e. absolute value, but then we still need the net to be an accurate zero). Is there a way to leave the "amount" field off of the definition page. Also, whenever we try to enter in a tolerance, we get an error message to select the tolerance type, but there is no option to do so on a one-side rule. We are having the same issue with the many to many rules where the rule is not summing up the transactions into one before executing match
Hi! New to Vb.Net here. Trying to write a UD8 formula which extracts the right 3 characters of an Entity member name, only when the member is a base member. Error message received says "'IsBase' is not a member of 'Member'." Anyone know how to make this work? If api.View.IsAnnotationType() Then 'Check if the member is a base member If api.Pov.Entity.IsBase Then 'Return the last three characters of the member name Dim membername As String = api.Pov.Entity.Name Dim lastThreeChars As String = Right(membername, 3) Return lastThreeChars Else 'Return a NoData Datacell if not a base member Return api.Data.CreateDataCellObject(0.0,True, False) End If Else ' Return a NoData Datacell if not an annotation type Return api.Data.CreateDataCellObject(0.0, True, False) End If
Hi Experts, I am working on TransformationEventHandler rule in which we need to read the first 4 columns of a text file that is being uploaded to Workflow Import so I can do some sanity checks and error out if they are not correct. Does anyone have sample code that reads the values of file? I checked everywhere but not much documentation on this. Also, I placed this code in "ParseSourceData" BREventOperationType. Not sure if this is correct or need to put under "ParseTransformationRules"? Thanks in advance, PM
Hi Everyone. I am trying to run a CustomCalculateBR in another BR, and I have the following for the variable namevaluepairs, but I would also like to pass parameters in this BR. I have been investigating but did not find a solution. Similarly, I would like to ask if passing with .base will work the same way as if it were in a step or not. I would appreciate it if you could help me. Dim mvp As New Dictionary(Of String,String) mvp.Add("Cube","HLFPLN") mvp.Add("Entity",strEntTx1) mvp.Add("Consolidation","Local") mvp.Add("Scenario","|WFScenario|") mvp.Add("Time","T#|!PLN_ParamFcstMths!|") mvp.Add("View","None") mvp.Add("Flow","None") mvp.Add("IC","None") mvp.Add("UD5","None") mvp.Add("UD6","None") mvp.Add("UD7","None") mvp.Add("UD8","None") mvp.Add("Parameters","test=ValueTest") BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si,"PLN_ThreeMonths2","Test",mvp,CustomCalculateTimeType.MemberFilter)
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.