Discuss formulas and business rules for your application.
Recently active
I'm making a simple event handler rule that sends an email when a workflow is processed. I would like the email to include the datetime when it was processed, the user who did it, the workflow, workflow profile and entity. However I've only been able to include the date and time. My code is structured like this: Main calls the sub XFR_HandleEndProcessCube() Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DataQualityEventHandlerArgs) As Object Try Dim returnValue As Object = args.DefaultReturnValue args.UseReturnValueFromBusinessRule = False args.Cancel = False Select Case args.OperationName Case Is = BREventOperationType.DataQuality.ProcessCube.EndProcessCube Me.XFR_HandleEndProcessCube(si, globals, api, args) End Select Return returnValue Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function XFR_HandleEndProcessCube() sub sends the email, using the help
All,I have a form populated with data & I am trying to retrieve the data through the Finance BR under calculate. It is not displaying the data in the error log.Sample Data. I am trying to retrieve the data at Parent Entity with Base ICP intersection. BaseICP - 3000Parent Entity - P10000.2The below is the code If api.Pov.Scenario.Name="Actual" And api.Pov.Cons.Name="Elimination" Then Dim Entity As String = api.Pov.Entity.Name Dim Parent As String = api.Pov.Parent.Name Dim Ownership As Decimal = api.Data.GetDataCell("E#" & Parent & ":C#Local:S#ActualOwnershipCalcs:A#UltimateOwnership:F#None:O#Top:I#" & Entity & ":U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None").CellAmount &nbs
I'm trying to build a label that shows target goals for each entity. Now since each region has different goals. I'm looking for my label to change the value based on the entity selected. Here is an example (We're still in development so not the most eye catching) Its referencing a parameter -- How can I pass a condition or a rule that reads the POV entity and shows me that specific value.
We are working on a POC to extract data using FdxExecuteDataUnit. We are using an Extensibility business rule and running it using a DM job. I am getting assistance from our corporate IT group as I am not good with C#. The business rule is writing data to a table and then is taking the data from the table and putting it in a text file. There is something missing or wrong with this and I am hoping someone can help with the code since I do not have access to the TechTalks that focus on FdxExecute. The code was written to do the FdxExecuteDataUnit and then also write some sample data to the table. This way if the FdxExecute does not generate any data we at least get a file with the sample data. I am getting a file but it only has the sample data spelled out in lines 100-150 of the business rule. I am also getting the following warning when I compile the rule: "1) Warning at line 54: Unreachable code detected" If I comment out that line
I've tried to implement this function as per the Business Rules Editor snippet: Dim objByte() As Byte() = BRApi.CubeViews.Process.ExportCubeViewGridsToExcelFile(si, custSubstVarsForAllCubeViews, cubeViewNamesAndVars) However, I've had a few problems with this, the main one being that I've been unable to save whatever it returns to an Excel file. Here's what I've tried: Dim fileName As String = "test.xlsx" Dim filePath As String = $"Documents/Users/{StringHelper.RemoveSystemCharacters(si.UserName,False,False)}" Dim XFfileDataInfo As New XFFileInfo(FileSystemLocation.ApplicationDatabase,fileName,filePath) Dim XFfileData As New XFFile(XFfileDataInfo, String.Empty, objByte) BRApi.FileSystem.InsertOrUpdateFile(si, XFfileData) Whenever I run this code the output file is an XML. How do I save this to a .xlsx file?
Hi All - I have a scenario where I need to copy the data from Parent Entity to the Base Entity with ICP. ThanksKrishna
Hello All, SetDataCellsUsingMemberScript() seems to only write the last value added to list. I am successfully adding 14 records to the objMemberScriptValues list (I can loop through them and see the 14 unique intersections) but only the last one is being updated in the cube. I'm looping through the records in a datatable and then each intersection is added to the list: '*********************************************** For Each row As DataRow In dt.Rows strProfileName = row.Item("ProfileName").ToString strCube = row.Item("Cube").ToString strEtT = row.Item("EtT").ToString strCnT = row.Item("CnT").ToString strSnT = row.Item("SnT").ToString strTmT = row.Item("TmT").ToString strVwT = row.Item("VwT").ToString strAcT = row.Item("AcT").ToString strFwT = row.Item("FwT").ToString strOgT = "Forms" strIcT = row.Item("IcT").ToString strU1T = row.Item("U1T").ToString strU2T = row.Item("U2T").ToString strU3T = row.Item("U3T").ToString strU4T = row.Item("U4T").ToString strU5T = row.Item("
Hi experts, hoping someone can guide me. Our P&L is recorded by Line of Business (UD2), however our balance sheet is recorded to UD2 None. FPA has a requirement that they currently handle manually to "allocate" the balance sheet to the lines of business based on the percent of revenue. Our partner initially achieved getting closer by using a dynamic formula on UD8. This does not ultimately provide the accurate results at the consolidated level (due to nature of dynamic formula). We believe we need to change this to a formula pass but it is proving to be challenging. We are open to suggestions, using UD7 (tracking) or UD6 (reporting). I am also open to creating a mini alt acct hierarchy since it really only needs to apply for a handful of summary level accounts. (Coding examples would be so very appreciated!) Thank you!
I'm trying to execute a calc after an input data in a CV, when the user click in the OS default save button (giving the flexibility to use a DB, CV or Excel addin with the same CV) Is possible?
Hi, we are implementing OS at present, and this is our first-ever project in OneStream; I need guidance on Business Rules. I am not sure what business rules we need to consider after and before we import the data from the Client system to match the client's legacy system data with OneStream numbers.Thanks,Preeti
I'm trying to lookup the users in a workflow execution group so I can e-mail them when the harvest batch process runs successfully. Below is the code I'm using to try and lookup the users within a workflow execution group. The problem is I don't know what to put in the "WorkflowGroupType" as Integer argument. I know that any number between 0 and 1249 will allow the function to run, but putting 1250 will error the function. I created a loop just to see if I could get any of the valid values to return something and didn't have any luck. Has anyone been able to successfully do this? Thanks!
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
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
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
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.