Discuss formulas and business rules for your application.
Recently active
Hi All, I would like to execute a batch posting of all unposted journals in all base workflow profiles. Is there a way I can execute the posting via business rule? Thank you in advance.
Hi Everyone, has anyone already tried to reference a Workspace Assembly business rule from a Finance or a Connector business rule? I have a business rule that is packaged to an Assembly in a Workspace: It has a set of public functions returning dictionaries and other variables. And I would like these functions being called from a Connector. I can successfully reference it from another Assembly workspace. But when I am using the same syntax in a connector, that is not working: I am assuming the referenced Business rule must be declared in the Properties, but I am not sure of the syntax. Or even sure this is accepted. Many thanks to anyone who can helps!
Hi Community, I try to save a simple data buffer within a Custom Calculate and receive a cryptic error message. Dim sourceDataBuffer1 As New DataBuffer sourceDataBuffer1 = api.Data.GetDataBufferUsingFormula("FilterMembers(C#Local,UD8#None)") sourceDataBuffer1.LogDataBuffer(api,"sourceDataBuffer1",100) Dim resultDataBuffer1 As DataBuffer = New DataBuffer() For Each cell As DataBufferCell In sourceDataBuffer1.DataBufferCells.Values Dim sCell As New DataBufferCell(cell) api.LogMessage(sCell.DataBufferCellPk.GetMemberScript(api)) resultDataBuffer1.SetCell(api.SI, sCell, True) Exit For Next resultDataBuffer1.LogDataBuffer(api,"resultDataBuffer1",100) api.Data.SetDataBuffer(resultDataBuffer1, api.Data.GetExpressionDestinationInfo(String.Empty)) When I start the Custom Calculate from data management, I select a base entity and C#Local, scenario and time. The code will write a log with an usual POV of the cell without common members (line 7) and also log the restultdatabuffer1 with 1 cell
Hello, I setup a filter on a workflow profile calculation to run a data management job as long as the no calculate is the selected option. We have a Data Quality Event Handler Business rule to run this; however when I click on process cube, it's running the job twice at the same time. This is the example of what it's doing when I say it's running twice: Here it the code from the event handler: Namespace OneStream.BusinessRule.DataQualityEventHandler.DataQualityEventHandler Public Class MainClass '------------------------------------------------------------------------------------------------------------ 'Reference Code: DataQualityEventHandler ' 'Description: Event handler method that provides an opertunity to supplement a normal data quality ' action with your own custom functionality. ' (Example: email after ProcessCube or publish report to sharepoint after failed Confirmation). ' 'Usage: Executes when a Data Quality a
cHi All, good day. I'm using a database connection and it's working good: Dim dt As DataTable = Nothing Dim dbConnApp As DbConnInfo = BRApi.Database.CreateDbConnInfo(_si, Dblocation.External, "OneStream BI Blend")Dim stringSQL As String= "SELECT Entity,UD1_01,UD1_02,UD1_03,UD1_04,UD1_05,UD1_06,UD1_07,UD1_08,UD1_09,UD1_10,UD1_11,UD1_12,UD1_13,UD1_14,UD1_15 from XFC_UD1sbyEnt where Entity = " & "'" & api.Pov.Entity.Name & "' ; "dt = BRapi.Database.ExecuteSql(dbConnApp, stringSQL.ToString, False) but in the error message log have a lot of messages that I need to close the connection Summary: Error in DbConnInfo.~DbConnInfo(). DbConnInfo should be used in a 'using' statement or Close() should be called explicitly. does someone know how should be the command for close the connection? Thanks in advance and best Regards. Mario Guerrero
I need to update the security on a scenario using a dashboard button, is this possible through a dashboard extender rule? Essentially a meeting will take place and certain scenarios will need to be locked down so no one can make changes besides the appropriate security group on the call. I will then need to change it back to the original security settings with a separate button once the meeting is over
Hello OneStream experts: Thank you for the helps in the past. I found this forum is very helpful. I feel the MultiplyUnbalanced function is very nice and wonder if it can take more than 2 components to multiply. They give an example: If I want to do A#UnbalancedMultiplication=A#60000 x A#41000:U2#Parts I can use the following: api.Data.Calculate("A#UnbalancedMultiplication = MultiplyUnbalanced(A#60000, A#41000:U2#Parts, U2#Parts)") But, if I want to do multiply three components A#UnbalancedMultiplication=A#60000 x A#41000:U2#Parts x A#51000:U2#Material how to use the MultiplyUnbalanced function? Thank you in advance for any answers.
Hi all Are there any key short cuts in the business rules editor? Cheers
I have created a literal value parameter for entity that I want to refer in my finance rules for calculation. Can someone share me a code where I can look up values from a parameter I set instead of running a E#Root.base or something. Running a E#Root.base where txt1='value' is not an option . Thanks
Hi Everyone. What I want to do is change the value of: si.WorkflowClusterPk.ProfileKey What I want to change is the ProfileKey of a Profile that can obtain the value by name. I need to make this change to modify a process that relies solely on the information from this attribute. Therefore, I would be grateful for your assistance.
Hi! New to Vb.Net here. Trying to write a UD8 formula which extracts the right 3 characters of an Entity member name, only when the member is a base member. Error message received says "'IsBase' is not a member of 'Member'." Anyone know how to make this work? If api.View.IsAnnotationType() Then 'Check if the member is a base member If api.Pov.Entity.IsBase Then 'Return the last three characters of the member name Dim membername As String = api.Pov.Entity.Name Dim lastThreeChars As String = Right(membername, 3) Return lastThreeChars Else 'Return a NoData Datacell if not a base member Return api.Data.CreateDataCellObject(0.0,True, False) End If Else ' Return a NoData Datacell if not an annotation type Return api.Data.CreateDataCellObject(0.0, True, False) End If
We have a requirement to create reporting that utilizes the number of months since a company was acquired to perform math on specific columns of data. We would like to attach the acquisition date in a text field of an entity, and create a member formula for a statistical account that calculates the number of months between that acquisition date and whatever month the Point of View is referencing (we could convert the POV month to a specific date if necessary). Is this type of calculation possible within stored member formulas?
Hi all,I'm quite new to OS integration pieces and being struglled with a request from my client to load dimension members using their data lake, so the memebers would be updated automatically or by a scheduled event.The database is already configured at SIC and working fantastically well, however, I can't figure how to use it's features to load the metadata members to one of our UD dimensions.I read a lot of topics here in the forum, but couldn't find anything that matches my case.I already tried to create a Extender BR, but I'm getting a "Object variable or With block variable not set" error message when running the "api.Parser.ProcessSQLQuery" function. Not sure if I'm doing something extremely wrong, so I"m assuming that this part of the api must be used only within Connector BR's.I also trie to create a connector rule to do the job, but when setting it up at the dimension property, nothing happened (not sure if I missed something here).Any help on this will be really appreciated!Re
I have some business rules that need to identify which environment the BR is running in. This is because they does different things in each environment. In one BR i want the process to run in Prod but not QA or Dev, in another i want to copy extract files to an external shared folder which is different for each environment. I was thinking of using a dashboard parameter but if after a Prod to Dev/QA refresh i forget to change the value of the parameter, the BR will copy the files to the Prod external folder and i don't want that to happen. this is why i am trying to find a way to identify the environment without relying on the value in a parameter. Any thoughts? Have a great day! Bill
Hey Guys,I was writing a rule to update a member description and text 1 field of the same member. I was able to update the member description, but can anyone help me with the text 1 field?Please find the code below which I am using to update the description..Dim SelectUD4 As String = args.NameValuePairs.XFGetValue("Param1")Dim NewDescriptionUD4 As String = args.NameValuePairs.XFGetValue("Param2")Dim UD4TextField As String = args.NameValuePairs.XFGetValue("Param3") BRApi.ErrorLog.LogMessage(si,UD4TextField) Dim member As Member = BRApi.Finance.Members.GetMember(Si,dimtype.UD4.Id,SelectUD4)If member Is Nothing Then Throw New Exception("Selected UD4 member not found")End IfDim newmember As New WritableMember(member)newmember.Description= NewDescriptionUD4newmemberbrapi.Finance.MemberAdmin.SaveMemberInfo(si, True, newmember, False, Nothing, False, Nothing, False)Any help would be appreciated.
I am unsuccessfully trying to write an expression to utilize a Text Field as a filter in a business rule:api.Data.Calculate("U4#Target = U4#Source*-1","A#IncomeStatement.Base",,,,,,"U3#UserDefined.Base.Where(Text1 = 'Filter')") Is this syntax possible, or is there another way that I can write this to ensure that it is only being written when Text Field 1 for UD3 is equal to "Filter?"Additionally, is it possible to attach this to a transformation rule as a complex expression as opposed to needing to run it through Data Management after loading data?
We are trying to temporarily disable the Write access on a scenario to Everyone during a long DM sequence. We were able to find the ManageDataGroup under Scenario Properties, however, we could not find anything for ReadWriteDataGroup, which is a XMLConstants based on the API reference. Any help appreciated!
Dears,We have a requirement, where we need to write only into C#Elimination of [Share of Profit from] A#NetIncome and Same to be written to A#Investment in Equity Account as a other side of entry for the Equity Account type of consolidation in OneStream [We do not need line by line consolidation for all other items/accounts]To achieve this, I setup a entity as follows:PCON = 0POWN = 50%Ownership Type = Equitywhen i put PCON as zero[0] and execute the consolidation, the results are not writing up to Elimination member. What can be the reason for same?
If a POV has more than one dynamic calc member (for example Account and UD8) does anyone know the sequance they are calculated in? I assume, and it appears from a little testing I have done, that it is similar to how it works in DUCS and it goes Account, Flow, UD1, etc but looking to confirm. Thanks.
I am trying to call a cube view extender Business Rule assemblies from a cube view. Not sure if I am missing anything. I looked at the reference manual and followed how it was defined in the manual. Cube view extender BR Assembly calling the assembly from the Cubeview.
Hello, I'm trying to delete a File Share file but getting the error in the Subject above and I don't know what's causing it - I'm hoping someone can help. This is my code: Dim fileName As String = "MyFile.csv" Dim folderPath As String = BRApi.FileSystem.GetFileShareFolder(si, FileShareFolderTypes.ApplicationRoot, api) + "\" + si.AppName + "\Groups\MyFolder BRApi.FileSystem.DeleteFile(si, folderPath, fileName) When this runs, this is the error: "Conversion from string "\\sgc000462adev2.file.core.windo" to type 'Integer' is not valid." Why is it trying to convert the folderPath to Int? How do I fix this? Thanks in advance for your help!
Hi all,I am trying to build a business rule to dynamically disable a button (become invisible) once the form status is completed. May I know is there any function I could leverage on to fulfill this functionality?Any suggestion would be appreciated. Thank you.Best,Jacky
I'm attempting to send an email with an attachment from a file stored in File Explorer. What does my file path look like if the file is saved in File Explorer->Application Database->Documents ->Public? Regards,Anusha
Text1 in workflow has two entity seprated by "/" Text1 parameter Entity1/Entity2 I'm trying to achive rule If entity=entity1 calc1 else if entity = entity2 calc2 end if end if How do i retrive entities in text1 seprated by "/"
I need to create a business rule that will move a file from a user's folder in File Explorer to the server's File Share. I am using the BRApi.FileSystem.GetFile method to successfully read the file, but I am unable to write the file to the server. I believe my issue is with the XFFileInfo parameters. I am not sure how many parameters to provide and what the value to provide for the folderFullName parameter. Here is my current code: 'Get the file Dim sourceXFFileEx As New XFFileEx sourceXFFileEx = BRApi.FileSystem.GetFile(si, FileSystemLocation.ApplicationDatabase, sourceDir & "/" & sourceFile,True,True) 'Save the file but this part is not working Dim targetFileDataInfo As New XFFileInfo(FileSystemLocation.FileShare, fileName, ??) Dim targetFileData As New XFFile(targetFileDataInfo, String.Empty, sourceXFFileEx.XFFile.ContentFileBytes) BRApi.FileSystem.InsertOrUpdateFile(si, targetFileData)
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.