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.
Related Content
- 2 years ago
- 2 years ago
- 3 months ago
- 3 years ago