Triggering calculations for parent-dependent cons members using member filters in DM

jesvam
New Contributor III

Hi, I'm curious to find out how I can trigger a calculation for any consolidation member that requires a parent reference, such as OwnerPostAdj, through a data management step using member filters.

I just want to trigger a fast calc for all entities for this consolidation member to push a value and get instant feedback to the user in a dashboard, I don't actually want to aggregate/consolidate to the top.

I can run it for a specific entity with reference to its parent but I don't understand how I'm supposed to input it here if I want to run it for each valid entity-parent intersection. Looping and executing it multiple times is not an option. 

See below for what I want to accomplish. 

jesvam_1-1712665581473.png

 

 

3 REPLIES 3

JackLacava
Community Manager
Community Manager

Not tested, but P#<TopParent>.Base.Parents should give you all the parents. However, this will likely result in executing the sequence multiple times for the same parent, and for invalid combinations of entity/parent.

The workaround would be to write a Custom Calculate instead, targeting the bits you need.

For the record, unless you have a custom consolidation algorithm, targeting OwnerPostAdj rather than simply consolidating parents will not really make sense, because you're doing 99% of the same work but then not saving any result in the database.

jesvam
New Contributor III

Thanks for the help Jack! 

I tried this now, and apparently the parent filter expects the E#, not the P# just as a note. But regardless it's still giving me an error.  "The item was not found. Entity, Parent, -1"

jesvam_1-1712746269457.png

Can you expand a bit on your idea with the custom calculate? For this consolidation member it looks to me like it still requires the parent and when triggered as a DM job, i still have the same interface for filling out the entity-parent relation that i cant figure out how to input. 

jesvam_4-1712746798439.png

I guess I can trigger the custom calculate through the component selection changed interface on a component, or with brapi.Finance.Calculate.ExecuteCustomCalculateBusinessRule, but I wouldn't expect these either to process the member filters passed and I want this processed in parallel not looped.  

 

JackLacava
Community Manager
Community Manager

As I said, blindly going for .Parents will likely result in invalid combinations, which is where you get that error.

As for Custom Calcs: once you drop in code, you can build the combinations yourself and execute them with BRApi.Utilities.StartDataMgmtSequence. There are a few other parallelization techniques, like creating low-level .Net threads.

All of this sounds really overkill just to get a refresh though. I would simply consolidate all immediate parent entities, or break down the interface to work with subsets of the Entity tree and target just the top of that.