Discuss formulas and business rules for your application.
Recently active
I have a complex expression on the amount field in a data source used to convert any non-local currencies to the local currency (see below). That complex expression currently runs on tabular data with the time period (CurTime) I reference to pull the FX rate in one field. I am now wanting to have this same complex expression used on a Matrix data source with time across 24 fields. Any thoughts on how this could be done? Is there a Column Number api I could use to define CurTime? 'This is to look to see if the entity is a non local USD entity and convert the USD data to Local Dim fields As List(Of String) = StringHelper.Splitstring(args.Line,",") Dim curEntity As String = fields(2) Dim UKEntityDim As OneStream.Shared.Wcf.Dim = BRApi.Finance.Dim.GetDim(si, "iFinDept") Dim UKEntityDimTypeID As Integer = UKEntityDim.DimPk.DimTypeId Dim CurEntityID As Integer = BRApi.Finance.Members.GetMemberId(si,UKEntityDimTypeID , curEntity) Dim CurEntityLocCur As String = BRApi.Finance.
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
Does anyone do regression testing when upgrading to a new version of OneStream or upgrading to a new version of a MarketPlace solution? I'm looking for best practices, industry standards, etc. to more formalize this process for internal controls.
Hello,we're trying to paralellize datamanagement jobs over years with this call QueueDataMgmtSequenceBut it seems the task called by this function is not running.Should we have missed something ?myTask1 = BRApi.Utilities.QueueDataMgmtSequence(si, sSequenceName,VarBR1)myTask2 = BRApi.Utilities.QueueDataMgmtSequence(si, sSequenceName,VarBR2)myTask3 = BRApi.Utilities.QueueDataMgmtSequence(si, sSequenceName,VarBR3)myTask4 = BRApi.Utilities.QueueDataMgmtSequence(si, sSequenceName,VarBR4)myTask5 = BRApi.Utilities.QueueDataMgmtSequence(si, sSequenceName,VarBR5)myTask6 = BRApi.Utilities.QueueDataMgmtSequence(si, sSequenceName,VarBR6)
Hi all.We have a spreadsheet rule that needs to pull a value from another database table.The lookup runs successfully in an existing Dashboard Extender, and I was initially requesting the amount by calling the Extender from the spreadsheet rule, but that only ever returned the default value, even though the lookup does have a valid value.Because that failed to return a value, I tried making the call directly, as shown:sOperational_Capacity = BRApi.Database.LookupRowFieldValue(si, "ExternalDB", "XFC_STEP3_DEV2_OperationalCapacity", objDbwheres, "Operational_Capacity", 9876).XFConvertToDecimalLocalNB: The 9876 is just a default value that is different to zero, so that I recognise it, and we use the ConvertToDecimalLocal to deal with French culture users.Basically, when I run the call from the spreadsheet rule (either directly or by calling the Extender rule), I receive the default value every time.This same code runs perfectly from the Extender BR, returning the correct value.I have also
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
Is there any way to format a number for the FORMULA DRILL DOWN to show as more than two decimal places or format the output as a percentage? I have some factors that are applied against another account that need 4 or more decimal places to look like they calculate correctly. In the example below, the number should be .0588.
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?
Hi all,I need to make a calculate icon in a dashboard visible based on the form status. Based on another post in the forum to check the workflow status, tried below script to first check the workflow status and return true if completed and false if not completed.It throws error message as "The given key is not present in the dictionary".Kindly enlighten on the reason for this error message and on how the form status can be checked. Thanks
Hi all,I'm working on a Dashboard Extender BR where different processes will be triggered depending on the button selected by the user on the dashboard.The BR is structured this way:The two parameters shown above (p_scenario and p_yearmonth) retrieve the value for Scenario and Period from the WF.Every time the user clicks on a different button, two variables are assigned the value of WF Period and WF Scenario as shown above. The process works fine for all of the dashboard buttons except one. When that one is clicked, the values of WF Period and Scenario are not retrieved. The two variables shown above are left as empty strings. Any idea what might be causing this? I'm using the same formula for all of the buttons:Dim Scenario As String = args.SelectionChangedTaskInfo.CustomSubstVars.XFGetValue("p_scenario")it works fine on all buttons except that one Thanks in advance for any help on this!
Hi Experts,I have subsidiary entity where it needs to be consolidated 100% but with other line of adjustments as belowNCI calculation on equity portion/Share capital elimination.in HFM, We used to write on default consolidation rule first and then method specific rule on top of thisif same thing is to be applied in Onestream, can i follow as below ?If entity method is subs thenStep1 api.ExecuteDefaultShare() to consolidate every account 100% firstlyUser defined tagging=> Text tagging to Equity related accounts to pull accounts for NCI portion calculation.Step2 Text specific Source accounts are reversed with Minority portion(%) into Elimination member and same writing to offset NCI account into the Elimination member like HFM ??
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,can you please suggest/advise what kind of consolidation Algorithm type rule we need to write generallyours is orgbyperiod application, we have subsidiary entities(75%) for this NCI/Goodwill and also other part of side holding company - Investment elimination is to be taken care along with ICP elimination in standard.
Hi Experts, I would like to store existing cell destination value to temp variable so as to write back to destination by appending of source cell value using databuffer - with the following script i have written can only copy source cell to destination, but it does not append if the value is already exist in destination prior to write from source cell amounts.( I need because multiple source values are writing up to same destination then each time it is getting replaced already existing value- which is not correct as per the business case) Dim ResulDataBuf As DataBuffer = New DataBuffer() Dim DestinationInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("V#Periodic") Dim DataBufFilter As DataBuffer = Api.Data.GetDataBufferUsingFormula("FilterMembers(V#Periodic),[A#[root].base.Where((Text1 <> "")And (Text2 <> ""))]") DataBufFilter.LogDataBuffer(api, "records", 100) For Each sourceCell As DataBuffercell In DataBufFilter.DataBufferCells.Values Di
Hi All, I have written below rule where, I am not able to see the results, But rule is executed without any errors. Rule is about : Writing up the source values based on the Tex1 and Tex2 assigned in the source Accounts. where Text1 & Text2 are target Intersections to to actually be written to... Kindly help me if something is missing in the code. Dim ResulDataBuf As DataBuffer = New DataBuffer() Dim DestinationInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("V#Periodic") Dim DataBufFilter As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(V#Periodic,[A#[BS].Base.Where(Text1 <> vbnullstring And Text2 <> vbnullstring)])") For Each sourceCell As DataBuffercell In DataBufFilter.DataBufferCells.Values Dim cashflowCell As New DataBufferCell(sourceCell) 'Temp buffercell within the loop to copy my cashflow cell Dim sText1 As String = api.Account.Text(cashflowCell.DataBufferCellPk.AccountId, 1) 'Source Mvmt Dim sText2 As String = a
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
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.