memberIdsInFilter As Dictionary(Of Integer, Object)

New Contributor III

I'm trying to use the DataBuffer.GetFilteredDataBuffer() function which returns a DataBuffer.  This function takes two parameters as follows:

1. DimTypeForFilter as DimType;  If I'm filtering for accounts this is DimType.Account.  DimType.UD1 for UD1, etc.

2. Now I'm having trouble with the second parameter.  memberIdsInFilter As Dictionary(Of Integer, Object)

I find no examples on this.  Please help with an example.



New Contributor III
'Date Accounts
Dim Origination_DateAcctId As Integer = api.Members.GetMemberId(dimTypeId.Account, "Origination_Date")

'Dim AccountFilter As New Dictionary(Of Integer, Member)
'AccountFilter.Add(Origination_DateAcctId, api.Members.GetMember(DimTypeId.Account, "Origination_Date" ) )
Dim AccountFilter As New Dictionary(Of Integer, Object)
'This FILTER WORKS, but I have nothing in the Object portion of this Dictionary
AccountFilter.Add(Origination_DateAcctId, Nothing) 

'Now let's get the data buffer, and be able to filter out certain accounts
Dim mystartDataBuffer As DataBuffer 
mystartDataBuffer = Api.Data.GetDataBufferUsingFormula(“FilterMembers(A#All,[A#[JG Prototype].Base], U1#L10001106, U1#L10001109)”)
Dim mySpecificAccountDataBuffer As DataBuffer
mySpecificAccountDataBuffer = mystartDataBuffer.GetFilteredDataBuffer( DimType.Account, AccountFilter )

So strange.  I'm able to put the dictionary keyclass (the first part) as the account's member id.  That gives me the filter I want.  However, what's the point of OBJECT section of the Dictionary then?  I'm seeing just an array of integers in use, not a Dictionary.



Row# Account Flow Origin IC U1 U2 U3 U4 U5 U6 U7 U8 Amount DataType StorageType
1 Origination_Date None Forms None L10001106 None None None Existing_Book None None None "638,382,168,000,000,000.00" IsRealData Input



My wild guess, which i don't have time to test, is that Object can itself be a Dictionary of IDs, which will be applied to filter children of the key ID - recursively. It would be a pretty beautiful way to get subsets of a tree.

New Contributor III

Oh wow.  Mind blown.  That would be amazing.  Thanks @JackLacava.  

New Contributor III

I did some test but was not able to confirm this.