Forum Discussion
The DataBufferCellPk is simply a unique ID associated with a data buffer cell. Think of it as an address on a map. That address is unique and can only point to one location.
If you are trying to allocate data across entities where you are running the calculation from the Source Entity and 'pushing' data to other entities, an api.Data.Calculate or SetDataBuffer will not work since they will only write data to the entity currently being processed (the Source Entity in this case). To do this, the best practice is to execute a CustomCalculate Business Rule directly from your business rule and pass in the target entities through the parameter dictionary. You can also pass through data buffers or other object through the param dictionary or Global Variables.
Dim brParamDict As New Dictionary(Of String, String) From {
{"Cube", api.Pov.Cube.name},
{"Entity", entity.Name},
{"Consolidation", "Local"},
{"Scenario", api.Pov.Scenario.Name},
{"Time", timedimhelper.GetYearFromId(api.Pov.Time.MemberId)},
{"View", "YTD"}}
'Trigger custom calculate
BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si, _
"Chapter8Examples", "RentAllocation2", brParamDict, CustomCalculateTimeType.AllInYear)
Alternatively, you could trigger the allocation from the Target entities and 'Pull' data from the Entity which holds the pre-allocated data. So you're DM sequence would have the Target entities defined and your source script of your api.Data.Calculate would contain the Source Entity.
Another comment on the rule you posted is that you should refrain from using BRApi functions when equivalent API functions are available due to performance impact of using BRApi. In your example, the api.Data.GetDataBuffer should be used instead of BrApi.Finance.Data.GetDataBufferDataCells.
Hi Jon.
Where the process is being carried out is within a Business Rule (BR) of Dashboard Extender. However, I have not fully understood how the allocation process works there, including how the entire process is executed and how the billing is handled. I would greatly appreciate it if you could explain a bit more about how this might work.
- TheJonG5 months agoContributor III
Hi Marco - I am not sure I understand what you are asking. Are you trying to perform a calculation i.e. write data to the Cube via a Dashboard Extender? If so, this is generally not recommended and should be performed in a Finance Rule due to performance, data quality, and overall complexity.
That being said, there is a BRAPI function which will write data to the Cube - BRApi.Finance.Data.SetDataCells which can be used by passing in a list of Data Cells.
- Marco5 months agoContributor II
Hi JonG.
What I wanted to do was an allocation, but due to certain situations, we can no longer use IC (I didn't create the process to perform the allocation). So, I wanted to find a way for it to work by switching from using IC to UD5.
Related Content
- 7 months ago
- 6 months ago
- 2 months ago
- 2 months ago