Data Management & Data Buffer on 2 entities

Sergey
Contributor III

Hi !

I want to confirm a data management behaviour...

Right now I have data in a driver on Entity 9999, that I need in order to calculate data on entity 1032. The output should be on entity 1032.

I am using a data management job where the DUCS are set for Entity 1032. However when I run the DM, my data buffer is not getting any data for Entity 9999.

I think somewhere someone mentioned that using SetDataBufferVariable you can retain data in the whole Data Management sequence, so I tried to change the Data Management DUCS to "E#9999, E#1032". But the variable seem to be cleared when cycling to the second entity.

Then my question is : How can I get my data buffer to "read" data from another entity (E#9999) when my data management job run on E#1032 ?

 

Here's my code which obviously doesn't work at the moment. The goal is simply to have databuffer1 get data from Entity 9999, and databuffer2 to get data from current entity 1032:

Dim dbr1 As DataBuffer = Nothing

If api.Pov.Entity.Name = "9999"

dbr1 = api.Data.GetDataBufferUsingFormula("V#Periodic:A#OVH_ALLOC_KEYS:O#Forms",dataapiscriptmethodtype.Calculate)

api.Data.FormulaVariables.SetDataBufferVariable("myDataBuffer1", dbr1,False)

dbr1.LogDataBuffer(api, "ovh_dbr1 " & api.Pov.Entity.Name ,100)

Else

dbr1 = api.Data.GetDataBufferUsingFormula("$mydatabuffer1")

End If



Dim dbr2 As DataBuffer = Nothing

If api.Pov.Entity.Name <> "9999"

dbr2 = api.Data.getdatabufferusingformula("FilterMembers(removezeros(V#YTD:A#DIST_DIR:O#BeforeAdj:I#None:U1#None:U3#US:U4#None:U5#BU_USA:U7#HO:U8#None),F#Import_by_Currency.Base)")

api.Data.FormulaVariables.SetDataBufferVariable("myDataBuffer2", dbr2, False)

dbr2.LogDataBuffer(api, "ovh_dbr2",100)
End If

 

Regards,

1 ACCEPTED SOLUTION

Sergey
Contributor III

Well, it seems that I wasn't able to retrieve data because they are in different "Consolidation" member since Entity 1032 is set in USD, and Entity 9999 is set in EUR.

So the data buffer is indeed getting data when I specify "C#EUR". When omitted, no values are considered. Since C#EUR and C#USD are 2 different elements (even though I've selected C#Local in the data management for consolidation filter), then I guess C#Local would redirect to C#USD when looking for E#1032, hence I had to force the C# to EUR in the business rule ...

 

View solution in original post

2 REPLIES 2

Sergey
Contributor III

Well, it seems that I wasn't able to retrieve data because they are in different "Consolidation" member since Entity 1032 is set in USD, and Entity 9999 is set in EUR.

So the data buffer is indeed getting data when I specify "C#EUR". When omitted, no values are considered. Since C#EUR and C#USD are 2 different elements (even though I've selected C#Local in the data management for consolidation filter), then I guess C#Local would redirect to C#USD when looking for E#1032, hence I had to force the C# to EUR in the business rule ...