Discuss formulas and business rules for your application.
Recently active
I want to run a simple calculation setting one account equal to another. Account A = Account B. Account A, the account receiving the data in the calculation, is set to at the member level to YTD for No Data Zero View for NonAdjustments. The account with the data is set to Periodic. The problem is when Account B has data for some months and then has a calculated 0 in later months. The Account A with the YTD setting just replicates the last period's data in the months with 0 in Account B which causes the two accounts not to be equal. I am using the following calculation. api.Data.Calculate("A#AccountA = A#AccountB" , True) How is this normally managed?
Hi all We have a process where we update dimensions and their children on a regular basis. This means we need to delete the relationships between parents and children and then reload the new updated dimensions...etc. This takes a very long time, because we have a lot of dimensions. Has anyone out here used a script to make this process faster, we we to not have to reload everthing, but only update the changes made to the different hierarchies? Thank you for any suggestions Nouria
hi, I was trying to use a cell format parameter I had stored in an Account Text field in a cube view using an XFBR rule. Can this work? My attempt below. thanks, Greg Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As ObjectTry If (args.FunctionName.XFEqualsIgnoreCase("CheckDataForVisibleColumn")) ThenReturn Me.CheckDataForVisibleColumn(si, globals, api, args)ElseIf (args.FunctionName.XFEqualsIgnoreCase("GetAccountFormatFromText")) ThenReturn Me.GetAccountFormatFromText(si, globals, api, args)End If Return NothingCatch ex As ExceptionThrow ErrorHandler.LogWrite(si, New XFException(si, ex))End TryEnd Function#Region "Standard Helper Functions" Public Function GetAccountFormatFromText (ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As StringTryDim AccountID As String = args.SubstVarSourceInfo.PovMembers.Account.MemberI
I am trying to populate 30 months with depreciation. So if an asset value is 300,000 $, and it is to be depreciated to zero in 30 months, that would mean that I have to fill each month with 10,000$. Seems like standard, simple BR that has already been written. Does anyone know where I can find sample BR code for straight line depreciation?
Hello team,I am wondering if I can call an UD détail with args.confirmationruleargs.info ? I need to display and show only the data that fail based on UD.base , is it possible to do that on the info box in the confirm rules or should i do it through BRs and then call it in the conf rule? And do you have an idea what can be the syntax to show the base members of a specific UD that fail ?Thanks in advance , appreciate your help
Hi,Can anyone help in writing a confirmation rule where if Account starts with 4 and U3#00 has a value then the rule fails and the Account name is displayed.I am getting an error in running through the loop for all the account starting with 4, the rule probably stops at first match itself. If anyone could give the rule from scratch would be great!Thanks!
Hello, we renamed some companies adding a space and some text. For example company "64" was renamed in "64 TA" After renaming we started to have issues in the rules like if Onestream does not recognize the space. This is a sample error message we receive. Summary: Unable to execute Business Rule 'WES_Rules'. Invalid script 'A#4028_02:O#Elimination:F#None:I#64 TA:U1#None:U2#None:U3#IC_Details:U4#INTERCOMPANY:U5#None:U6#None:U7#None:U8#None' near '64'. Is there some hidden contraint in Onestream that prevents clients to create element with spaces? By the way, do you know if there is any workaround to overcome this issue in the rules? because I belive our custmer will not accept to go back to the simple company code. Thanks in advance Marcello
I want to retrieve data from a .csv file from Filestore\Everyone folder and later convert the data in to a a dataTable in an extensibility rule. Does any one has a sample BR.
Hi - I know the below code is not a good practice but is there is an alternative way to set the data =0 because I want to clear all Origin Base member and UD2 base. Any help would be appreciated ? api.Data.Calculate("A#ACCT:F#EndBalInput:UD1#" & ud1Member & ":UD3#" & ud3Member & ":I#" & icpMember & ":C#USD:O#All:UD2#All:UD4#None:UD5#None:UD6#None:UD7#None:UD8#None = 0")
Hi, Is there a way where users can input From and To dates time members in a cube view? Currently, I am using a parameter in the time member field in POV section of cube view. I have a business rule with FROM and TO dates (2022M1 to 2022M4) and then extract all the periods within (2021 M1 M2 M3 and M4) that time frame in a dt. And now, I want to incorporate this function in the cube view. feel free to drop your inputs.
In an earlier post a user named Sam helped me find a way to find the value of a variable in a Custom Calculate job using the Parameter field. Now, how can we access the value of the parameter in a regular Calculate job which does not have the Parameter field? The variable is |CVYear|. How can we access it directly in a BR (standard Calculate)? Thanks, Chris
Can any one provide me with a rule snippet for updating Entity Percent Ownership. I have tried a few things using the SaveRelationshipInfo but it is not working.
Good Evening, It should be something simple but apparently I am missing something. I am trying to get the Value for the Text1 field for an Account Dimension member using a Business Rule. The Text1 value vary by scenario. I trying to use ".Options()" but can get it to work. Is this the best alternative? Would you know of other alternatives? Is there a BRApi function which already does this? Thank you for the help,
Hi, How is it possible to update Entity Relationships through Business Rules, including Ownership Type, Percent Consolidation and Percent Ownership? It must be possible since the latest version of the Application Control Manager can also update entity relationship information, however I couldn't find it in the api.
Hi all, I am building a cube view for my end users to tell them the first common parent of two entities based on parameter inputs. However, I am having trouble with the BRApi.Finance.Members.GetFirstCommonParent formula as used in a Dashboard XFBR String. Here is the formula at prompt: BRApi.Finance.Members.GetFirstCommonParent(si, dimPk, topMostMemberId, memberIdA, memberIdB, dimDisplayOptions) The input for "topMostMemberId" seems to dominate the return value of the formula. If I put our top most entity hierarchy memberId into the input, the formula will return that value, even if it is not the first common parent. If tried a number of different inputs here, all of them seems to just spit out on the return. What am I missing? Is there something in the dimDisplayOptions I need to toggle? Here is my VBA: If args.FunctionName.XFEqualsIgnoreCase("GFCP") ThenDim EntityInputName1 As String = args.NameValuePairs.XFGetValue("Entity1")Dim EntityInpu
Hi all, I'm trying to give the end-user the option to enter their forecasts in either 13 week increments (a quarter essentially) or for the full 52 weeks. This specific XFBR will determine the green cells below. I'm unsure of what line 28 should be or if this XFBR could be easier to define. Week13Column and FullYearColumn are existing parameters that list 13 weeks of scenario and the full 52 weeks of scenario, respectively. Thanks!
Hello, good evening, I am trying to build a BRApi function to get the content of the UD6 constraint from an Account dimension member and so far I couldn't find a function that returns the information. Does anybody knows if it is possible to build a BRApi function like that or have done that in the past? Thank you for the help!!!!
Looking for a solution. Update description of a member in an Extender rule for an already existing/new member. If Possible, not mandatory but can we add a descriptions/alias for various language on a new/existing member?
Hi all, we have a databuffer with values to be cumulated in a specifi destination intersection. The issue we have is that api.Data.SetDataBuffer always wirte the last value. Is there a standard parameter (or workaround) we can use? At the moment the only valid solution we have found is to read the current value with a specific "api.Data.GetDataCell" and then sum to the databuffer amount. But I am sure there must be a smarter solution. Thanks, Marcello
I have a parser rule that works fine for a Budget type scenario but does not read a WFText1 for a Scenario Type 2 . I am using the below syntax to read the WFText1 property from a parser rule .This step is an import type step. It returns the GL list as blank for my scenario type 2 but works fine for my budget type scenario. Both are in different Workflow profiles. It picks up the correct workflow profile as i checked after logging it but unable to somehow pick up the text 1 value .
General Formatting One of the most important things you can do, to make you rules readable and helpful, is making sure they are properly formatted. There are some simple rules you should probably follow all the time: Proper Case – Function names are not case-sensitive; for example, api.data.calculate, Api.Data.Calculate, or API.DATA.CALCULATE, are treated as the same. Still, it is a best practice of VB style to be consistent and to capitalize judiciously. Proper case throughout the rules file makes it much easier to read. Always Comment – Add comments to most lines of code explaining what you are doing and why. Use the apostrophe at the beginning of the comment to make sure it is not interpreted as part of the rules. If this is done in a VB editor, it should turn green by default. Indentation is critical for readability – This is especially true when using any nested statements or conditionals. Those are explained below. Indentation should be done for any scripting, even scripting obj
The below code will delete the Security Group using extender rule. Dim secGrp As List(Of Group) = Brapi.Security.Admin.GetGroups(si) For Each Item As Group In secGrp If Item.Name <> "Nobody" Or Item.Name <> "Administrators" Or Item.Name <> "Everyone" Brapi.Security.Admin.DeleteGroup(si,Item.Name) End If Next
Anyone have an example how to create Json files within OS?(I need to create an export of Cube View and a Metadata extract in Json format, this will be triggered by a DM job.)
All - Could you please review code is make sense from performance. I am trying to be checking the target Account is <> 0 then it will delete the source value and overwrite the target value. PLease review and let me know if I can use some kind of EVAl or Data Buffer??? If Not api.Entity.HasChildren Then If Not api.Cons.IsLocalCurrencyForEntity Then api.Data.Calculate("A#Target:F#EndBalInput=RemoveZeros(Eval(A#Source))",AddressOf OnEvalDataBuffer) End If End If Private Sub OnEvalDataBuffer(ByVal api As FinanceRulesApi, ByVal evalName As String, ByVal eventArgs As EvalDataBufferEventArgs) eventArgs.DataBufferResult.DataBufferCells.Clear If Not eventArgs.DataBuffer1 Is Nothing Then For Each Cell As DataBufferCell In EventArgs.DataBuffer1.DataBufferCells.Values If Cell.CellAmount <> 0 Then 'api.LogMessage(cell.CellAmount.ToString) api.Data.ClearCalculatedData(True,True,True,"A#Target") eventargs.DataBufferResult.SetCell(api.SI,cell) ' El
I am getting the "String was not recognized as a valid DateTime" error when trying to execute the batch dataload using the extender business rule. The value being passed to the batch is the following string: "2023M1" I would appreciate any advice on the cause. Thank you, Yan
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.