Discuss formulas and business rules for your application.
Recently active
Hi everyone. i want to make the following calculate, but i want to make the one of all the departments and all the projects, but when i put it as .base it gives me error in the calculate, then i would like to know how i can solve it or in what other way it should be made so that it works correctly.an image of my step configuration api.Data.Calculate("CB#[HLFPLN]:E#"& entity &":S#[" & scenario & "]:T#" & time & ":A#cra_639950:F#InCostsAllocation:O#Forms:I#11201_11207:U1#ALL_DEPARTMENTS.Base:U2#P0000:U3#LOCAL_DATA:U4#ALL_PROJECTS:U5#None:U6#None:U7#None:U8#None = (E#11201_11207:S#[ForecastAllocation]:T#" & time & ":A#cra_ALLOCPRCT:F#None:O#Import:I#11201_11257:U1#ALL_DEPARTMENTS.Base:U2#P0000:U3#LOCAL_DATA:U4#ALL_PROJECTS:U5#None:U6#None:U7#None:U8#None)*(E#11201_11207:S#[" & scenario & "]:T#" & time & ":A#cra_639950:F#None:O#Top:I#None:U1#ALL_DEPARTMENTS.Base:U2#P0000:U3#LOCAL_DATA:U4#ALL_PROJECTS:U5#None:U6#None:U7#None:U8#None)",False)
I am trying to get dimension info using a member name. I came across the function, Dim nValue As Integer = BRApi.Finance.Members.GetDimIdFromMemberId(si, dimTypeId, memberId), but it requires dimTypeId. Is it possible to get dimTypeId using member name
Is it possible to create a custom user prompt / error message to pop up when a user tries to complete a Form and triggers a FormsEventHandler? I have tried throwing an Exception as below but the problem is it includes additional information about the business rule error that is irrelevant to the end user and could cause confusion. Is it possible to create a cleaner message that just contains the message itself.
Dear all, Is there any file containing the detail/syntax of the functions? I'm thinking for instance in an XML file or something similar. This is a similar question already posted, but I'd like to know if there's an update. Solved: documentation/list of functions in OneStream Namespaces/Libraries - OneStream Community (onestreamsoftware.com) Thank you in advance. Carlos
Hi All, we are trying to check the data before deleting a member, the issue is with derived data if we have derived data in that member not able to track it. while deleting the member it show having data but in real there is no data only 0 derived is there not sure how to handle this. Please let me know if any more details required.
Hello, I'm tying to read files from an azure fileshare mount as a disc unit in the same server where SIC is installed. I guess this has to works as a disc unit C:/ but the business rule throws an execution error Could not find a part of the path 'z:\\Temp\\zw_2023.csv'. this is part of the code that I'm using Public Sub CleanupData(ByVal si As SessionInfo)Dim objRemoteRequestResultDto As RemoteRequestResultDto = BRApi.Utilities.ExecRemoteGatewayBusinessRule(si, "TestFile", Nothing, "remote_test", "DeleteOldFileData")If (objRemoteRequestResultDto.RemoteResultStatus = RemoteMessageResultType.RunOperationReturnObject) ThenDim result As Booleanresult = objRemoteRequestResultDto.ObjectResultValueDim objRemoteRequestResultDtoCached As RemoteRequestResultDto = BRApi.Utilities.ExecRemoteGatewayCachedBusinessRule(si, "TestFile", Nothing, "remote_test", 90) BRApi.ErrorLog.LogMessage(si, "File Deleted: " & result) ElseIf (Not (objRemoteRequestResultDto.remoteException Is Nothing))
Hi Everyone. I want to perform a subtraction of columns 1 and 2, I did it with the code below, but I see that it affects my performance too much, so I would like to know what other option I can do to do something like this without affecting the performance too much, I added that it waits 600 seconds but it still takes too much time. GetDataCell(T#WFYear-|!PLN_ParamNextFcstYear!|):Name(test) (I am subtracting the current year's values from the next year's values.)
Hello, I'm having a lot of difficulties in trying to connect to my local gateway to execute a business rule that would insert values from a datatable into a local sql table. The examples providing in the documentation look incomplete or contain errors. My gateway is called : abc_gateway and redirect to my local machine which is online I have a custom database server connection which is redirected towards my local machine 'abc_local' My business rule that will invoke the BR on my local machine (this business rule currently sits in a workspace assembly) : Dim GatewayName As String = "abc_gateway" ' Name of the GatewayDim SICFunctionName As String = "SIC_Functions" ' Name of the SIC Function to runDim RemoteMethodName As String = "RunOperation" ' Name of the method inside the SIC Function that will be called.Dim resultdatatable = BRApi.Utilities.ExecRemoteGatewayBusinessRule(si, SICFunctionName, Nothing, GatewayName, RemoteMethodName) Then I have a smart integration function in
Hi Community,I am building a Business Rule which will pull data base level data for a specific parent under the Account dimension.I am using FdxExecuteDataUnit to pull data from the cube, but I am not able to add Parent.Base as Account filter in the parameter. It's seem like I am only able to put a member directly and not and .Base member in the filter. Dim sFilter As String = "Origin='Import' and Flow='EndBal_Input'"BRApi.Import.Data.FdxExecuteDataUnit(si, sCubeName, $"E#{sEntFilter},E#82,E#85", sCons, scenarioId, $"S#{sScenario}", $"T#{vPeriod}", sView, True, sFilter, 4, False) Thank
Hello, where can I find the definitions of the LogonStatus codes in the UserLogonActivity table? I checked the design document and didn't see them there. Thanks!
Hi Everyone. I have the following Databuffer, but what I want to do is to change the accounts to the following: A#TRAVEL.Base, ,A#OTHERINCEXP.Base,A#ADVERTEXP.Base, A#PRINTINGSUP.Base, A#REPMAINT.Base, A#DELIVEXP.Base, A#COMMUNEXP.Base, A#PROFEES.Base, A#PROFEESDSPMT.Base, A#OTHERCONT.Base, A#DEPAMOREXP.Base, A#RENTEXP.Base, A#UTILITIESEXP.Base, A#OTHOCCOST.Base Dim SrcDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(CB#[HLFPLN]:E#" & curEntity & ":S#[" & curScenario & "]:T#2024,[A#OCCUPANCYEXP.Base, A#CONTROLEXP.Base, A#OTHERINCEXP.Base],[U1#" & curDepartment & ".Base])") but at the end I want to remove some specific accounts, so I would like to know how to do this without the parents that have the .base, example: 612900 621105
My application has a weekly time dimension? I am trying to find a function that will derive prior weeks so I can calculate the Trailing8WeekAvg and Trailing26WeekAvg. I am able to get the last actual week via a literal value set by a combo-box. Based on the last actual week, I am trying to get the prior week. I have tried api.Time.GetPriorPeriod(api.Time.GetIdFromName("2025W8") and it returns the prior month 2025M1 not the prior week. I also tried: 'Dim dPriorWk1 As Decimal = api.Data.GetDataCell("T#PeriodPrior1(2025W8)").CellAmount which passes the syntax validation but then returns an invalid script error. I have tried encompassing 2024W8 in [] or quotes and still get an invalid script error. I also tried V#Trailing2MonthAvg and V#Trailing6MonthAvg but they only work for Months. All suggestions are welcome. Thanks.
Hi Everyone. What I want to achieve is a method for performing an allocation where a charge is made from one entity to another, or even perhaps just a different department within the same entity. I have been reviewing examples, but I have not seen one where this transfer is made and the amount in the source entity is adjusted to reflect the charge. Therefore, I would appreciate your assistance in implementing this in a Business Rule (BR) to accomplish something similar to the example shown in the image and the BR that I reviewed. Dim sourcePov As String = "E#A:O#Import:F#EndBal_Load:A#100001:UD5#ADJ" api.Data.FormulaVariables.SetDataBufferVariable("source", sourceBuf, False) api.Data.Calculate("E#B:O#Forms:A#100001:UD5#ADJ:F#SomeFlow = $source * 0.5", False) api.Data.Calculate("E#C:O#Forms:A#100001:UD5#ADJ:F#SomeFlow = $source * 0.4", False) api.Data.Calculate("E#C:O#Forms:A#100001:UD5#ADJ:F#SomeFlow = $source * -0.9", False) api.data.calculate(sourcePov & " = 0 * $source") ap
Hi, Does anybody know if there's a way to create Data Attachments using business rules? Something similar to this functionality, but in code: Thanks!
I am trying to run a Custom FX translation rule on run a set of Account @HistoricalRate with Periodic Rule type.The function seems to be working fine for the direct Rule type but does not seems to be working for the periodic Rule type. any reason? Dim Accts As List(Of MemberInfo) = api.Members.GetMembersUsingFilter(api.Dimensions.GetDim("Dim_Accounts").DimPk,"A#Equity.Base.Remove(A#CTA,A#CY_RE,A#Pr_Yr_RE)") Dim AcctList As New List(Of String) For Each Mem As MemberInfo In Accts AcctList.Add(Mem.Member.Name) Next If AcctList.Contains(api.Pov.Account.Name) Then Return New FXRateResult(False,api.FxRates.GetCalculatedFxRate(api.FxRates.GetFxRateType("HistoricalRate")),FXRuleType.Periodic) 'Does not work 'Return New FXRateResult(False,api.FxRates.GetCalculatedFxRate(api.FxRates.GetFxRateType("HistoricalRate")),FXRuleType.Direct) 'This works (Commented) End If
I am storing a record in one of the OneStream database tables, but once stored, I am unable to view the component on the OneStream page. I need to refresh manually multiple times or modify another component to see the changes. Could anyone please help me resolve this issue? Thank you.
Hi, I'm currently setting FxRates via BR using below snippet: objFxRatePk = new FxRatePkUsingNames(osFxRateType, osFxRateDate, sourceCurrency, targetCurrency); objFxRate = new FxRateUsingNames(objFxRatePk, decimal.Parse(rate), true, false); objFxRateList.Add(objFxRate); // <removed for brevity) BRApi.Finance.Data.SetFxRate(si, item); // <snip> BRApi.Finance.Data.LockFxRate(si, rateType, currentMonth); It works fine but when a new source currency is added, it doesn't show up in Application/FX Rates table. *** EDIT - realized I didn't phrase this very well *** Am I missing a step somewhere? Am I missing a step somewhere to automate this? Or is it not possible?
For context, we have a button on a dashboard that triggers a function held in the workspace assemblies (specifically as Dashboard Extender). That function starts a data management sequence. When the user presses the button OS just stops. You can't check status, you can't navigate anywhere else in the instance. The button remains depressed seizing hold of your instance until the DM sequence is complete. The issue is this sequence takes up to 30 minutes to complete. You can open a new instance and move on, but that is highly inconvenient. Is there a way to set it up in the assembly dashboard extender that the DM sequence runs as a background job, and the button doesn't need to stay active until complete? Thanks,
Hi, is there a way to completely validate data cell access for a user in a BR using the api? I'm looking for something that would run the same logic as you would expect from a cube view, basically validating cube, scenario, entity and sliced security at the same time. I would expect a method that takes a user and a datacell object and returning true/false or similar.
I can extract data by using SQL in the System and Application Tables, but I don't know how to extract the Data from the System Tab -> Logging -> Logon Activity, Task Activity or Error Log. If I choose right click and export, then I just get the current screen. Thanks in advance of any help / suggestions. Tom
I am trying to write a parser business rule to give the portion of a string that begins with US and the 6 characters after from a data source. For example, the imported line reads "mmmmmmmmmUSxxxxxxmmmmmmm" and I want to parse out USxxxxxx to which is mapped in the transformation rules. I also need it to be dynamic because the line will not always be in the same character place. It could also be "mmmmmUSxxxxxxmmm" or anywhere else within the text. I have tried using the rule below but it is not bringing back any values. The import is reflecting "blank." Dim sText As String = args.Value Dim result As String = "" If sText.Contains("US") Then result = sText.Substring(sText.IndexOf("US"),8) End If Return result
Hi Team, Is there a way to copy data from base entity member to parent entity member at O#AdjInput and at different scenario for ex: i have data setting at base entity at O#Import,S#Actual, now i want to copy the same to Immediate parent entity at O#AdjInput, S#Actual_Test. Please let me know if any one as any solution. Thank you in Advance Satish P
Hi Everyone. I would appreciate some help in understanding how the DataBufferCellPk works in the following code, and in general. I’m currently reviewing a business rule where entities are charged to others—essentially an allocation. However, I haven't found any use of CALCULATE or similar functions that would typically handle this process. This leads me to believe that DataBufferCellPk might be responsible for it. Could you please assist me in understanding this better and provide more context on the issue I'm trying to resolve? Dim dbcpk As New DataBufferCellPk( mbrRefIdAcc, mbrRefIdFlow, intOriginId, mbrRefIdIC, mbrRefIdUd1, mbrRefIdUd2, mbrRefIdUd3, mbrRefIdUd4, mbrRefIdUd5, mbrRefIdUd6, mbrRefIdUd7, mbrRefIdUd8 ) 'BRApi.ErrorLog.LogMessage(si,$"Valores de DataBufferCellPk 2023M3: MbrRefIdAcc: {mbrRefIdAcc}, MbrRefIdFlow: {mbrRefIdFlow}, IntOriginId: {intOriginId}, MbrRefIdIC: {mbrRefIdIC}, MbrRefIdU
Dear community, I need to send data over another external Azure SQL table. What are the ways (and possible business rules ?) to do so especially if this external table hasn't been configured as a regular "external table" by onestream ? Regards,
I have a BR that is setting a value in a member's text3 field. In doing this I have the following code which appears to NOT save the member description so it is being cleared. BRApi.Finance.MemberAdmin.SaveMemberInfo(si, PDOToUpdateInfo, True, True, False, TriStateBool.FalseValue) I changing the False in the line above to True, the code compiled with no errors, but at runtime I received the error " Error updating member 'IT_PGM_1038_27'. Invalid parameter. Descriptions, IT_PGM_1038_27." What am I doing wrong? I can send more of the code if that would be helpful.
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.