Discuss formulas and business rules for your application.
Recently active
Hi all,the SetDataCell command I am trying to use is behaving in a strange way and I would like to check if that is a bug, if it is by design, or if I may be doing something wrong.I am trying to use the SetDataCell command to clear data on the Origin=Forms. The command looks like this (it is part of a custom calc rule):'Clear data on the Form memberapi.Data.SetDataCell("Cb#Main:E#" & MainPovEntity & ":S#" & MainPovScenario & ":A#AC410000:U1#None:U2#None:U3#" & UD3Name & ":U4#None:U5#Local_GAAP:U6#None:U7#None:U8#None:O#Forms", 0, True)Now, if the UD3 member which I am trying to clear has data on the Origin=Import member, the Forms member is correctly set to zero by the rule. However, if the UD3 member has no data on the Origin=Import member (on that specific Pov intersection defined by the rule above), the Forms member retains its value. Anyone else experienced this behavior? Thank you
Hi, I'd like to use the ClearStageData function within a business rule. I am already successfully using other similar functions like ExecuteParseAndTransform or LoadCube. This is the sample given within OneStream: Dim objLoadTransformProcessInfo As LoadTransformProcessInfo = BRApi.Import.Process.ClearStageData(si, wfClusterPk, sourceId) The issue I have with the ClearStageData function is that I don't understand what I should pass as sourceId. Can any of you clarify it or point me to any relevant documentation? Thank you
The below code copy the Prior Period FX Rates from one Type to Another. This will read the currency from the application properties. I have hard coded the Period but you can use WF or Global or Param and call in the DM/Dashboard. 'Get the Period Dim CurrentPeriod As String = "2021M1" Dim PriorPeriod As String = "2020M12" 'Get Currency from properties Dim objAppProperties As AppProperties = BRApi.Utilities.GetApplicationProperties(si) Dim currency() As String = objAppProperties.CurrencyFilter.Split(",") 'Add FX rates For Each c As String In currency Dim fxRatePkUsingNames As New FxRatePkUsingNames("AverageRate", PriorPeriod, c.ToString, "USD") Dim objFxRateUsingNames As FxRateUsingNames = BRApi.Finance.Data.GetStoredFxRate(si, fxRatePkUsingNames) If objFxRateUsingNames.Amount > 0 Then Dim fxTargetRatePkUsingNames As New FxRatePkUsingNames("ActPriorMon", CurrentPeriod, c.ToString, "USD") Di
We have a dashboard with a button that displays a dialog for user entry. The base dashboard has a cubeview that needs to refresh based on the values modified via BRApi.Finance.Data.SetDataCellsUsingMemberScript() calls. We are using a XFSelectionChangedUIActionType.CloseDialog task result to close the user entry dialog. Is there a way to programmatically refresh the base dashboard?
I need to test if a workflow channel is locked in a BR before performing the BR actions. Can I test if the channel is locked? How?
The display of the parameter shows 2 Accounts selected but when retrieving the parameter in the business rule only the first one is passed.If I display the list box selections on the dashboard it shows the correct selections, comma separated.If a comma is in the string that is passed to the Business rule, only the information before the comma is recognized. If there is no comma, the whole string is recognized. Label:Copy '|!Prm_SourceScenario_QMC!|' To '|!Prm_TargetScenario_QMC!| ' For A# '|!Prm_SourceAccount_QMC!|' , T#'|!Prm_SourceTime_QMC!|' , V#'|!Prm_SourceView_QMC!|' , F#'|!Prm_SourceFlow_QMC!|' Button:{CopyQuorumToForecast_QMC}{Prm_SourceScenario_QMC=[|!Prm_SourceScenario_QMC!|], Prm_TargetScenario_QMC=[|!Prm_TargetScenario_QMC!|], Prm_SourceAccount_QMC=[|!Prm_SourceAccount_QMC!|], Prm_SourceTime_QMC=[|!Prm_SourceTime_QMC!|], Prm_SourceView_QMC=[|!Prm_SourceView_QMC!|], Prm_SourceFlow_QMC=[|!Prm_SourceFlow_QMC!|]} &n
Hi Experts,I want to limit my cons member only to "Elimination". can I use "api.pov.cons.Name.XFEqualsIgnoreCase("Elimination")"
Hi Experts,When do we exactly use DataBuffer1, DataBuffer2 in rules. while we have databuffer in api.much appreciate if one example can be provided atleast
Hi Experts,I am trying to read the member ID in data buffer to assign some values accordingly, But it is giving in correct ID seemsin the log file i can see ID as "-1" , Generally Member ID was different in the dimension library if this is readying correctly - Kindly confirmDim vSrcUD2Split As String() = Split(sText2,":")Dim GetUD1Ac As String = Trim(vSrcUD2Split(0)):Dim GetUD1Mvt As String = Trim(vSrcUD2Split(1))Dim vTgtActID As Integer = api.Members.GetMember(DimType.Account.Id,GetUD1Ac).MemberPk.MemberIDapi.LogMessage(vTgtActID) Outcome is : -1
Hi,I'm using a Derivative Check Rule for the first time - using the sample available in GolfStream (HoustonSalesDetailOffset > ValidateCheckSum) - the Rule itself is working fine, I am getting the correct Pass/Fail Status. My question is where can I expect to see the CheckRuleMessage displayed?GolfStream Sample: My Result (partial screenshot only as from Client App):It feels like there's a column missing from the screen? Or perhaps it should be a pop-up window on the right like with other Validation/Intersection errors?Thanks in advance for any help!
I have a case where the client needs to add members to a dimension regularly and the ADM, Add Dimension Members, dashboard is idea as found in GolfStream. However, there is a problem in the ADM_SolutionHelper rule that stops this from running. It doesn't compile properly. Error compiling Business Rule 'ADM_SolutionHelper'. 1) Error at line 136: Property 'Name' is 'ReadOnly'. 2) Error at line 137: Property 'DimId' is 'ReadOnly'. Can someone explain how to resolve this please.
Hi, I'm trying to copy data from Actuals into Forecast, but it seems to only work for Input and Forms Origin members, and not for Adj. Here is my formula, which I put on the Forecast Scenario: 'Copy data from Source Scenario for months 1-5 Dim currMonthNum As Integer = api.Time.GetPeriodNumFromId(api.Pov.Time.MemberId) Dim sScenario As String Dim ScenarioSource As String = api.Scenario.Text(api.Pov.Scenario.MemberId, 1) If ScenarioSource = "" Then sScenario = api.Pov.Scenario.Name Else sScenario = ScenarioSource End If If currMonthNum = 1 Or currMonthNum = 2 Or currMonthNum = 3 Or currMonthNum = 4 Or currMonthNum = 5 Then If api.Cons.IsLocalCurrencyforEntity() And Not api.Entity.HasChildren() Then api.Data.Calculate("S#Forecast2:A#All = S#" & sScenario & ":A#All") api.Data.Calculate("S#Forecast2:A#All:O#AdjInput = S#" & sScenario & ":A#All:O#AdjInput") End If End If Not sure what I'm doing wrong. Any ideas? Thanks!
Does anyone know if it's possible to access XFStrings through Business Rules? We are adding other languages to our application and we are using XFStrings for Cube Views and Dashboards. We want to present our custom BR error messages in the user's chosen language so we thought XFStrings would be a good place to keep them. However we don't know if it's possible and if it is possible, how to do it. We are currently using Transformation Rules for some other areas but we want to have a single place where the translations can be managed. Thanks
Hi,I have a data management step which runs an extensibility rule. In the rule I am using the “Throw New XFUserMsgException” command to return error messages.For example:Throw New XFUserMsgException(si,"","","Error: Copy cannot be completed. Source Scenario/Year must be different from target Scenario/Year")Gives the following result when conditions are met: When the step completes without error a box message appears, like the following one: How can I control the message shown when the step is successfully completed? I.e., how do I return a message in a box message without throwing an error?
Hi All,We have a requirement where we need to write a custom consolidation rule for Subsidiary(Method) entities.Kindly provide us with a sample business rule along with the functions to be used. so that we can modify as per the business need.Requirement:1) Subsidiary: Entity owned at = 57%.2) The Subsidiaries financial statements are consolidated and eliminated. 3) The Equity associated with the subs financial statements are eliminated against the Holding companies Investment in the sub. 4) The owned portion of Equity is eliminated and the unowned portion is reclassed to Minority Interestregards,BCG
Got a task to copy certain file from FileShare to Documents\Public because users security settings. Wanted to go with the standard System.IO.File.Copy(strSourceFile,strTargetFile) where source and targets are sting. Can get full source file path using the FileShareFolderHelper. However can't get full path to the target, that is under FileSystemLocation.ApplicationDatabase. Any suggestions how can I get the target path or otherwise copy the file in question?
Within the Extender business rule used to integrate with our ERP system I would like to loop through all the "Import" steps within a specific node of workflow hierarchy and to read the values of the "TextX" properties. I've heard that this is possible but have no idea where to start. Any guidance would be greatly appreciated. Yan
Hi guys,I coudn't find the proper hint in OneStream.In my dashboards, I'm using several XFBR string rules or Dashboard extender rules. I would like to move some of them to Workspace assemblies, available starting version 7.4. If I do so, does anybody know how to call a function in there?Stupid example, I'm defining the position of a temporary file to download with an XFBR rule called MyXFBR, function CleanUsername.UrlOrFullFileName=[Internal/Users/XFBR(MyXFBR, CleanUsername)/Temp/FileToDownload.csv] Now I've created the same function CleanUsername in a Workspace assembly named MyAssembly, in a file named FolderManagement.vb. How this should be amended?XFBR(MyXFBR, CleanUsername)?? XFBR(MyAssembly, FolderManagement, CleanUsername) ?? it doesn't look very good.... That's pretty new, but I hope a few guys in this community have used it already.
Hello, did anyone find the OneStream Foundation Handbook useful for learning the software? the copy I see on amazon is from 2021. Are there different editions available? thank you.
An allocation business rule is not allocating the rates properly . Hence we would like to debug the business rule and also figure out which intersections are passed and what is the value and allocation rate used in allocation calculation . This allocation process involves a formula in UD7 member . Please advise how to see the messages used in api.logmessage . Should we need to create a dashboard to capture the messages that are logged while running the allocations. Again, we are looking for which members used and the value / rate used to allocate.
Every dimension needs to be defined in each Transformation Rule Profile created. Question Credit: Chul Smith Is this statement fact or fiction? Comment your best guess below! Answers will be revealed in one week. * This question is applicable to Platform 7.3.0 and may not be relevant to future releases
I am trying to write a parser business rule to pull out the middle portion of a date string from a data source. The file has the date as "1-Jan-23" and I want to pull out the Jan. On the data source, I have the time dimension assigned to the proper column in the file. The month is always 3 characters, and the year is always 2 characters. I am getting an error that I am unable to execute the BR. Can I not use args.value for the starting point of my parser rule ? Dim filetime As String = args.Value Dim filetimelen As Integer = filetime.LengthDim startpos As Integer = filetimelen - 6Dim month As String = filetime.Substring(startpos, 3) Return month
Based on the XML, it looks like I need a reference to the OneStream.Shared.Wcf.CubeViewItem object that contains the CubeView. The CubeView object doesn't seem to have a property for it's Name.Does anyone know how to get the name of the Cube View currently calling a Cube View Extender from within the extender rule?
Hello Experts, I have a requirement of calculating Cash_ADJ based a sum value of 2 different buffers. If the sum value is Positive I have to post a cash_adj with value from bufSrc2. Is it possible to filter Buffer 1 and write corresponding buffer 2 value to result buffer? Or the approach has to be completely changed for this requirement? If ((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity())) Then Dim destInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("A#Cash_ADJ") Dim bufSrc1 As DataBuffer = api.Data.GetDataBufferUsingFormula("A#Cash") Dim bufSrc2 As DataBuffer = api.Data.GetDataBufferUsingFormula("A#Loan") Dim bufSrc3 As DataBuffer = bufSrc1 - bufSrc2 Dim resultBuf As New DataBuffer () For Each newCell As DataBufferCell In bufSrc3.DataBufferCells.Values If Not NewCell.CellAmount > 0 Then Dim resultCell As New DataBufferCell(newCell) resultBuf.SetCell(si, resultCell, True) End If Next
Does anyone have a piece of code to clear data on the origin Forms member for just a few accounts? The api.data.clearcalculateddata is not possible (data is not calculated) and api.data.setdatacell doesn't work. 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.