Marco
2 days agoContributor II
How can I remove empty values from GetDataBuffer and obtain the entity with Text1, Text2, Text3?
Hi Everyone.
I would like to know how I can remove zero values in my GetDataBufferUsingFormula.
Dim DatabufferCalc As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(E#" & strParentEntity & ".Base,E#XFMemberProperty(DimType=Entity, Member=|!PerformPnL_Entity!|, Property=Text1).Base:S#[" & strScenario & "]:T#" & strPeriod & ":O#Top:I#None:U1#ALL_DEPARTMENTS:U2#ALL_PRODUCTS:U3#CORP_RPT:U4#ALL_PROJECTS:U5#None:U6#None:U7#None:U8#None,A#411000)")
And from the result, I would like to obtain the entity, and from that entity, know its Text1, Text2, and Text3. However, for now, I see that I can only obtain the account and the rest of the properties such as the UD
Dim DatabufferCalc As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(E#" & strParentEntity & ".Base,E#XFMemberProperty(DimType=Entity, Member=|!PerformPnL_Entity!|, Property=Text1).Base:S#[" & strScenario & "]:T#" & strPeriod & ":O#Top:I#None:U1#ALL_DEPARTMENTS:U2#ALL_PRODUCTS:U3#CORP_RPT:U4#ALL_PROJECTS:U5#None:U6#None:U7#None:U8#None,A#411000)")
api.Data.FormulaVariables.SetDataBufferVariable("DatabufferCalc", DatabufferCalc, True)
For Each sourceCell As DataBufferCell In DatabufferCalc.DataBufferCells.Values
'I would like to obtain the entity and Texts
Dim account As String = sourceCell.DataBufferCellPk.GetAccountName()
BRApi.ErrorLog.LogMessage(si)
Next