The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
Jorge_Haces
3 years agoNew Contributor II
Can I execute a BR after saving data?
I'm trying to execute a calc after an input data in a CV, when the user click in the OS default save button (giving the flexibility to use a DB, CV or Excel addin with the same CV)
Is possible?
- 3 years ago
If you are going to do this in EXCEL, your option will be to use WcfEventHandler. I wouldn't recommend using SaveDataEventHandler as that will run on every save operation.
- 1 year ago
Is your DQEH using a "StartDataMgmtSequenc" vs a "ExecuteDataMgmtSequence"? I think start just starts and moves on but execute will wait for completion, so an execute may update task activity box better.
ChrisLoran
OneStream Employee
3 years ago* As ck mentioned earlier, I would not use a SaveDataEventHandler because that will intercept every cell being written to the data unit, including calculate/setDataBuffer etc.
* I would also no recommend using a FormsEventHandler, because that only runs if the CubeView is run from a Forms workflow (won't work in dashboards, and won't work from Excel).
Personally, I use a WorkflowEventHandler, with the conditions:
If Not args.IsBeforeEvent _
AndAlso args.OperationName = BREventOperationType.Workflow.UpdateWorkflowStatus
This gets fired on any user-input data save, whether it be CubeViews/Form WF steps/Dashboards/Embedded Spreadsheet, or through Excel.
args.Inputs(3) contains what is called a Workflow Impact Message.
You need to test that it begins with the following text:
Dim strImpactMessage As String = args.Inputs(3)
If strImpactMessage.StartsWith("Reason = Save Data Cells") Then
'--- run your custom finance calculation
End If
This string will also contain
The Data Entry Type, whether it is Excel or CubeView
The CubeView name (if applicable) that was used to save data
The TaskActivityID, from which you can lookup any data units affected by the save.
WernerN
3 years agoContributor II
Chris,
Hope all is well. Need to bug you with a question.
First of all thanks for the source code.
Do you by any chance already have a C# WorkflowEventHandler.
I am stuck at converting args.input(3) to C#.
Thanks in advance.
Related Content
- 3 years ago
- 9 months ago
- 2 years ago