Discuss formulas and business rules for your application.
Recently active
I am trying to create a business rule which returns a time member driven by the Workflow scenario member. My forecast scenario members are structured as Jan_Fcst, Feb_Fcst...Dec_Fcst. For instance, Dynamic time filter, Year = WFYear and period based on Scenario, eg Jan_Fcst = 20**M1, May_Fcst = 20**M5. Does anyone have a snippet or suggestion on how I can go about doing this? Also, I was going to use it as an XFBR rule and I don't know how to run the BR by itself in order to look at the error log for help testing this rule. Any help is much appreciated.
Hello OneStream Community,I am using the SaveDataEventHandler to validate a cell amount being saved. Depending on certain conditions I update the amount in the “args.NewDataCell.cellAmount” and set “args.Cancel = False”.Instead of the modified amount in “args.NewDataCell.cellAmount” the original amount entered gets saved. In the snippet of the code below, a sample error log output when a user inputs 4.3466 in a form would be:Amount Before = 4.3466Amount After = 4.35But the saved amount in the form will be 4.3466.----Snippet Start-----BRapi.ErrorLog.LogMessage(si,"Amount Before = " & args.NewDataCell.CellAmount)args.NewDataCell.CellAmount = Math.Round(args.NewDataCell.CellAmount, 2, MidpointRounding.AwayFromZero)BRapi.ErrorLog.LogMessage(si,"Amount After = " & args.NewDataCell.CellAmount)args.Cancel = False----Snippet End-----Please advise.
Hi All - I am trying to create a View using a Extender BR and It is compainling without any issue but when I try to execute it am getting the below error. Any help would be appreciated. Dim vSQL As New Text.StringBuilder() vSQL.AppendLine("CREATE View dbo.v_stageData AS SELECT WFP.ProfileName As WorkFLowProfileName, S.Sn AS SrcScenario, T.SnT AS TgtScenario, S.Tm AS SrcTime, T.TmT AS TgtTime, S.Et AS SrcEntity, T.EtT AS TgtEntity, S.Ac AS SrcAccount, T.AcT AS TgtAccount, S.Fw AS SrcFlow, T.FwT AS TgtFlow, S.Og AS SrcOrgin, T.OgT AS TgtOrgin, S.Cn AS SrcConsol, T.CnT AS TgtConsol, S.Ic AS SrcICP, T.IcT AS TgtICP, S.U1 AS SrcU1, T.U1T AS TgtU1, S.U2 AS SrcU2, T.U2T AS TgtU2, S.U3 AS SrcU3, T.U3T AS TgtU3, CAST(S.Am AS DECIMAL(18,2)) AS Amount FROM StageSourceData S INNER JOIN StageTargetData T ON S.Wfk=T.Wfk AND S.WtK = T.WtK AND S.Ri = T.Ri INNER JOIN WorkflowProfileHierarchy WFP ON WFP.ProfileKey = S.Wfk WHERE T.SnT = 'Actual' AND T.TmT = '2023M1' AND WFP.ProfileN
Hi everyone, I was trying to add drill down capabilities to a calculated flow dimension member but was having issues with the drill down formula. I entered the formula below but still wasn't able to drill down into the flow member at all. Does anyone have any ideas on why it's not working? Formula: Formula for Calculation Drill Down:
All - The below extender rule will be able to delete multiple member from Parent Hierarchy. 1. Provide the Dimension Name & Top Parent Name in the Hierarchy - See highlighted in Red. 2. I want to make a point here the While Count > 3 because the it takes the current parent and other member ENtityDefault1 & None. Since we will not be able to delete it so it should be 3 or loop will be infinite. 3. You can use as an input Variable for Dimension and Top Parent and attach to the dashboard but this is a good starting point. Dim dimensionPK As DimPk = BRApi.Finance.Dim.GetDimPk(si,"Dimension")Dim nValue As Integer = BRApi.Finance.Members.GetMemberId(si, dimensionPK.DimTypeId,"TopParentName")Dim objList1 As List(Of Member) = BRApi.Finance.Members.GetAllMembers(si,dimensionPK,nValue)Dim objList2 As List(Of Member) = BRApi.Finance.Members.GetBaseMembers(si,dimensionPK,nValue)Dim mbrct As Integer = objList1.CountWhile mbrct > 3For Each mbrbe As Member In obj
I have UD8 DynamicCalc members that calculate various Growth %s. These work as expected when the Account dimension member referenced in the formula has a normal Account Type (e.g., Revenue or Expense). It doesn't work when the Account Dimension member's Account Type is a DynamicCalc.Any tips on how to solve for this? We can workaround this with some math in Cube Views, but would love to have a workaround for XFGetCell and Quick Views.
Is there a way, in a member formula or Finance BR, to write annotation data back to the database in bulk?In OneStream rule writing, it's best practice to limit the number of times you are writing data back to the database (ideally only one SetDataBuffer at the end of your code). However, it does not appear that you can include annotation information in the DataBufferCell objects that are used in a data buffer.Is there an alternate way to be able to set a large quantity of intersections at one time (like a SetDataBuffer), but for Annotation information instead of values?
It appears we can not use workflow event handler to automate an activity which has the same event operation type. Anyone has similar experience?We need to automatically unlock a workflow when a sibling workflow is been manually unlocked. We wrote the rule under the BREventOperationType.Workflow.WorkflowUnlock event. But the process always fail with the below error. The same code will work if we changed it to run from the BREventOperationType.Workflow.WorkflowLock event. It seems to me we can not trigger same type of events."The underlying connection was closed: An unexpected error occurred on a receive. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host (Socket Error Number 10054)"
Hi, I am currently working on creating a ParamHelper business rule to be used in a CubeView. The goal is to have the S#scenario driven by the time dimension parameter selected by the user, rather than by the workflow time. For example, if T# contains M1, the scenario that should be returned is S#Projection. I would appreciate any pointers or guidance. Thanks in advance for your help!
We have a logic that makes a multiplication of Transfer for Tax by Grouping Regime by Tax Rate (38,007 *0,1). It works for all entities, except one (here it always show 0): Do you have any idea why?Thanks a lot!
Is there an easy way, to copy data from one cube to another (with different dimensionality)
Is it possible to test if a consolidation or a data management job is already running before running it again ? Ex: I run a consolidation (about 10min) but another people run the same consolidation the same time Thank you for your help
Hello communityI have quite a stupid question. We have two functiont types for Member Lists, MemberListHeaders, MemberList.I couldn't figure out what the purpose of MemberListHeaders is. If I define a list in "MemberList" without having it in "MemberListHeaders", everything works fine. And if I add a list to "MemberListHeaders", it's not popping up anywhere in the application, as far as I saw.I was expecting something like in HFM: the Headers was used to display the list in a dropdown from which the user was able to select it, while the "List" was the place where the list was defined.I'm sure there's a use for MemberListHeaders, but I haven't gotten yet.Marco
Hello,I have InUse for default time and scenario = TrueI also have InUse for default time and scenario for 2023M5 = False.Note that the period could also be different.Now, how could I reset the InUse settings to disable the False or True on ALL time for default Scenario?In my example above, I am expecting the property for 2023M5 to be deleted. What brapi would you use? can you show me an example?Thanks
Hello,I'm trying to create a transformation rule for a specific entity that if it's a specific account (6189) it would go into a specific UD3. I'm not sure how to do this because there's 2 specific criteria needed, instead of being a 1:1. I'm new to OS, so all the tips and tricks help!Thanks,Will
Has anyone tried to rename scenarios using a business rule to have a rolling set of prior forecasts. In this case the client is to trying to have weekly scenarios for the prior 5 weeks. Once a week they will be importing into the current working scenario and rolling each prior scenario back one week.I tried using the code below but get the error "Error processing Data Management Step 'Roll_CAR_Weekly_Scenarios'. Unable to execute Business Rule 'Roll_CAR_Weekly_Scenarios'. Error renaming member 'CAR_PrWk5_MTD'. Invalid parameter 'CAR_PrWk5_MTD'."Thanks.
Hello,I am using 2 cultures on a server.I need to make some changes of entity properties from a BR.I know how to do it for properties like ALLLOWADJI can not find a way to change all the descriptions from the BR : I mean the Default + English + French.Any help appreciated.ThanksPS: I did read that 🙂 https://community.onestreamsoftware.com/t5/Rules/Update-description-of-a-member-in-an-Extender-rule-for-an/m-p/13158
Hi,I have a custom SQL table for people planning and want an ID field as my primary key. (The existing fields that would be good for a primary key need to editable (e.g. entry date) so I cannot use a set of existing fields as my primary key. Setting a field as a primary key makes that field not editable.) My question is how to set a field's default with a SQL code, "select NEWID()" which generates a unique code? I tried creating a parameter as a Bound List and SQL code with this query but when the dashboard with the SQL table editor is opened I get a pop up window asking for an input for this parameter. How are primary keys normally handled in this case? Thanks.
Hi all,I'm developing a dashboard that will likely be used by 10 different people. I'd like to lock the access to other users if one user has the dashboard already open (and maybe until he/she clicks on a button to unlock it?)Does anyone have a reliable approach to do this?Thanks in advance!
Hi Team, I have tried to make a simple task - if user in not in group I would like to change a certification status to rejected.This code is in DataQualityEventHandler:Case Is = BREventOperationType.DataQuality.Certify.FinalizeSetQuestionairreStateDim sGuid As String = "419eeb3d-eaec-43fc-bc0a-cab5862323f10"Dim Guid_1 As New Guid(sGuid)If BRApi.Security.Authorization.IsUserInGroup(si, si.UserName, "GROUP",False) = False ThenBRApi.DataQuality.Process.ExecuteQuestionnaireSignOff(si,si.WorkflowClusterPk,Guid_1,CertSignOffStates.ProfileRejected,"Comments")End If It always returns "Certified", but should "Rejected": Any ideas what am I missing?
Is it possible to change the orientation of a report using a business rule?I can't see any options for it when creating a custom report task in a cube view.
Hi I have created a member list on Account dimension members to pull accounts with Account type "Balance Recurring". Now I need to use this member list in Finance BR - Calculate Function Type to loop through this member list and copy data from December to Jan.I would like assistance on the syntax to filter by this member list on a data buffer function to pull the December data. Also I would like to know whether the member list will be executed one time and stored in the memory and used across all entities OR will it be executed for each entity when it runs through the consolidation process?I want to make sure using member list to achieve this data copy is performance efficient than directly filtering the members within the Finance Calculate BR using api.Data.GetDataBufferUsingFormula("RemoveNoData(FilterMembers(A#Root.Base.Where(AccountType = 'BalanceRecurring')
Hi ! I want to confirm a data management behaviour... Right now I have data in a driver on Entity 9999, that I need in order to calculate data on entity 1032. The output should be on entity 1032. I am using a data management job where the DUCS are set for Entity 1032. However when I run the DM, my data buffer is not getting any data for Entity 9999. I think somewhere someone mentioned that using SetDataBufferVariable you can retain data in the whole Data Management sequence, so I tried to change the Data Management DUCS to "E#9999, E#1032". But the variable seem to be cleared when cycling to the second entity. Then my question is : How can I get my data buffer to "read" data from another entity (E#9999) when my data management job run on E#1032 ? Here's my code which obviously doesn't work at the moment. The goal is simply to have databuffer1 get data from Entity 9999, and databuffer2 to get data from current entity 1032: Dim dbr1 As DataBuffer = NothingIf api.Pov.Enti
We have several parser rules that are running on our connector to d365. Is there a way to see what the affect on run time is from each of these rules? Do these rules run on all data that is queried from our connection or just new data?
Hi all,I'm working on a Business rule that will be triggered as soon as a user clicks on a button within a dashboard.Is there a way to retrieve the Username of the user that clicks on the button? Thanks in ad
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.