Discuss formulas and business rules for your application.
Recently active
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.
Hi, In the GetTableView function of a Spreadsheet BR, I extract data from a database table (XFW_TLP_Register). For a numeric value (e.g. NCode1) negative numbers are by default extracted to Excel as varchar (with “,” as decimal separator) and positive numbers as numeric values (with “.” as decimal separator). Hence, the value cannot be submitted back since it’s trying to submit a text value into a numeric database column. If I cast the column (in my SQL query in the GetTableView function) to numeric it works but then it will not display digits in the Excel. Any idea how to solve this?
Hi, I am trying to achieve variance and change sign flip using UD8 member and based on account type however it is working for some accounts and not for all types of accounts. If someone handles the situation thru UD8 member, please share your experience or thoughts here. Thank you. Here is the quick code snipped what I am using. Dim acctType As String = api.Account.GetAccountType(api.Pov.Account.MemberId).NameIf api.cons.IsLocalCurrencyForEntity And acctType.XFEqualsIgnoreCase("Asset") Then api.data.Calculate("UD8#MonthlyVariance=RemoveZeros((U8#None:T#Pov-U8#None:T#PovPrior1))")Else If api.cons.IsLocalCurrencyForEntity And acctType.XFEqualsIgnoreCase("Liability") Then api.data.Calculate("UD8#MonthlyVariance=RemoveZeros((U8#None:T#Pov-U8#None:T#PovPrior1)*(-1))")End If
I am using a BR to extract the Business Rules as part of an update process. I am using the code from here: https://community.onestreamsoftware.com/t5/Workflow-and-Data-Integration/Import-XML-to-create-objects/m-p/32087 I can extract to a zip file which contains the BRs wrapped up in their application area XMLs eg ApplicationDashboards.xml contains all the dashboard type BRs. I want to extract the BRs as individual files i.e. the format you get when you extract the xfproj file without checking 'Extract to zip'. Anyone know how to do that? Thanks
I am developing a member formula which uses Percent Of Ownership in calculation. I am using the following to get Percent of Ownership: Dim pOwn As Decimal = api.Entity.PercentOwnership(entityID, parentID) In the context of this calculation I have parentID but I only have a name for the entity. How can I get the Member ID from the Member Name? Additional question: what will the code above return if there is NO parent/child relationship between parentID and entityID? "0"? Thanks in advance. Yan
Hi all, I'm after a bit of advice. We have a STAT cube which has BS and PL data and there is a MGMT cube which has PL data but goes to the level of Regions (UD1) and Departments (UD2). There is a Stat entity structure and a Mgmt entity structure, with the only difference being S_ and M_ prefixes. So Group is S_GRP and M_GRP respectively. I have been requested to build a report to calculate creditor outstanding days by taking the Creditors balance in S_GRP and dividing by COS in M_GRP split by Regions (UD1) and multiplying by days in the month. I started to create some new reporting accounts to calculate these, but then I realised there's a mix of dimensions between the cubes so it's not as straightforward as using api.data.calculate etc. Does this seem like something that is possible? Currently the users utilise the XFGetCell function in the add-in, but want to have something more automated. Any advice is appreciated. Thanks
Hi all, I am baffled as to why I am unable to retrieve the Text2 ( or 3 or 4 ) attribute value in a workflow profile. I use the following code to get the Text1 value : Dim wfClusterPK As WorkflowUnitClusterPk = si.WorkflowClusterPk Dim wfScenarioTypeID As Integer = BRApi.Workflow.General.GetScenarioTypeId(si, wfClusterPK) Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, 18000) However, if I substitute 20000, 22000 or 24000 as the attribute it will not apply this in the business rule. I have checked the database tables and the values are there with those attribute values and the scenarioTypeId is set to 0 for Actual. Here is the database filter, so the value are there, but why even I hard code the scenariotype as 0 will it not retrieve these values for me. At present, am only just trying to get them to show in the error log. I am running the cubeview from the workflow profile, previou
Hi All Does anyone know if you can get the current member name in a Member Formula? As an example, I have the UD8 member UD8 AverageRate_Budget - I want that information without manually adding a variable. I have a lot of members whose member names contain all the information for their value. It would save me a lot of time if I had one script that I could copy to all the members without editing them to update the member name. The members are DynamicCalc if that makes a difference. I have tried args.DataCellArgs.FunctionName and args.CustomCalculateArgs.FunctionName but they both raise an error. Thanks Marcus
Hi, anyone has worked with a similar member script or rule that has a conditions - eg assessed loss utilised in the current year is based on higher of $1 million and 80% of Current Taxable Income account. This is limited to the assessed loss carried forward account (Assessed loss carried forward is assessed loss bough forward, less assessed loss utilised in the current year).
Hi all, I recently was going through a V8 upgrade and found that the documentation on ERPConnect with SIC was quite sparse. I hope this post helps anyone who might be struggling as I was a few days ago. Smart Integration Functions in Version 8 + now must make all calls using ERPConnect and referencing Dlls stored on the SIC Server. Make sure you add your 'ERPConnectStandard20.dll' to the referenced assemblies property of the Smart Integration Function, this will allow ERPConnect and ERPConnect.Utils to be imported into your SIF. You will likely also notice there is no IntelliSense for 3rd Party Dlls for SIF, which makes things a little tougher. Use this link for specifics related to the ERP Connect API. ERPConnect.Utils.ReadTable - ERPConnect HelpCenter (theobald-software.com) Smart Integration Function Snippet using ERPConnect Imports System Imports System.Collections.Generic Imports System.Data Imports System.Data.Common Imp
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.