03-16-2022 04:04 PM - last edited a month ago by JackLacava
We are trying to do a multi-year planning application. One requirement is the ability to calculate out-months into the next year of the plan.
One solution that would be very useful is the ability to run a custom calculation with a variable set of time periods.
"BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule" has an enumerated argument of CustomCalculationTimeType.
One of the enumerations is "MemberFilter", but there is no indication or documentation regarding how to supply the member filter for Time periods to execute for.
Would anyone know how to implement this, or where I could find the details regarding its usage?
Thanks in advance for any information or leads.
03-16-2022 04:46 PM
I'm assuming that you are going to use a DM sequence to execute this. You can pass time in the DM step to run for multiple periods.
03-16-2022 04:51 PM
This is the current solution, but it would be nice to run the Custom Calculation directly. The Data Management Tasks are filling up the Task window when running over many data units.
03-16-2022 05:00 PM
I'm still not sure how you can call it still.
03-16-2022 05:04 PM
Look for "BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule" in the Business Rule Editor.
Maybe this function is/was deprecated, but it would be very useful in cases where you need to run a calculation against custom time periods.
03-16-2022 05:10 PM
I do see that. However, to use that, you still need a DM job for the user to execute it. Or they should have access to run an extender rule (which will lead to opening the business rules page to the user!!!). I cannot think of a way to do it unless you go the route of dashboard buttons and extender rules. When you say a DM job is triggered for data units, how is that being called?
03-16-2022 05:17 PM
Right now, the app is just running "Brapi.Utilities.ExecuteDataMgmtSequence", but the DM Task is just a custom calculate that passes the data unit and time periods to the custom calc.
I'm inferring from your replies that "ExecuteCustomCalculateBusinessRule" still executes as a DM Task. (I hadn't actually run it, since I couldn't supply the proper time periods anyways.)
That inference does invalidate the purpose of my question, but it does not actually answer my question. I am still curious about how to use it. 🙂
03-16-2022 05:37 PM
No, I was not referring to that. I meant that you need a "UI" for the user to trigger the rule, which has the ExecuteCustomCalculateBusinessRule function, which means you need either a DM job or a dashboard button. Now, I've not used this particular method. Given that there is no option to pass the member filter. I believe that might be a keyword in the name-value pairs that looks for it.
The other part is that there is no mention of the data unit. I'm going to bet that it gets that from the cube pov.
03-16-2022 07:21 PM
I'm sorry if there was some confusion here, but I don't need any help with when or how to trigger the execution of this calculation. I just need to know how to use that particular function.
Your comment about the cube pov made me think it might be related to the MFTime substitution variable, so I'll have to give that a test. 🙂
08-24-2022 01:14 PM - edited 08-24-2022 01:20 PM
Did you ever figure it out?
08-24-2022 01:27 PM
In terms of the argument itself, when the MemberFilter enum value is used, it passes the MF substitution variables to the data management sequence. I believe this is for calling the rule from a CubeView cell.
09-02-2022 11:58 AM
a month ago
If you want to run a Custom Calc BR from another rule, such as an Extender Rule, you can do so with the following example code: