Skip to main content
Contributor
Aug 29, 2024 3:57 PM UTC
Solved

Exclude accounts in GetDataBufferUsingFormula

Hi Everyone.

I have the following Databuffer, but what I want to do is to change the accounts to the following: 

A#TRAVEL.Base, ,A#OTHERINCEXP.Base,A#ADVERTEXP.Base, A#PRINTINGSUP.Base, A#REPMAINT.Base, A#DELIVEXP.Base, A#COMMUNEXP.Base, A#PROFEES.Base, A#PROFEESDSPMT.Base, A#OTHERCONT.Base, A#DEPAMOREXP.Base, A#RENTEXP.Base, A#UTILITIESEXP.Base, A#OTHOCCOST.Base
Dim SrcDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(CB#[HLFPLN]:E#" & curEntity & ":S#[" & curScenario & "]:T#2024,[A#OCCUPANCYEXP.Base, A#CONTROLEXP.Base, A#OTHERINCEXP.Base],[U1#" & curDepartment & ".Base])")

but at the end I want to remove some specific accounts, so I would like to know how to do this without the parents that have the .base, example: 

612900
621105
SxDAnswer
Member
Aug 29, 2024 4:03 PM UTC

Hi Marco,

Depending which account rollup those GL accounts roll up to, you can use the .Remove function. For this example, I'll say it rolls up to A#OTHERINCEXP.

Dim SrcDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(CB#[HLFPLN]:E#" & curEntity & ":S#[" & curScenario & "]:T#2024,[A#OCCUPANCYEXP.Base, A#CONTROLEXP.Base, A#OTHERINCEXP.Base.Remove(612900, 621105)],[U1#" & curDepartment & ".Base])")

If that doesn't work, try adding double quotes around the account number. Hope this helps. 

1 reply

SxDAnswer
Member
Aug 29, 2024 4:03 PM UTC

Hi Marco,

Depending which account rollup those GL accounts roll up to, you can use the .Remove function. For this example, I'll say it rolls up to A#OTHERINCEXP.

Dim SrcDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(CB#[HLFPLN]:E#" & curEntity & ":S#[" & curScenario & "]:T#2024,[A#OCCUPANCYEXP.Base, A#CONTROLEXP.Base, A#OTHERINCEXP.Base.Remove(612900, 621105)],[U1#" & curDepartment & ".Base])")

If that doesn't work, try adding double quotes around the account number. Hope this helps.