Forum Discussion

Emilygustavsson's avatar
Emilygustavsson
New Contributor
10 months ago

Exclude accounts from rule

Hi! I have a business rule which allocates all PL accounts from a group of entities in one segment to other segments. However, I would like to exclude accounts that are IC from the allocation. I ha...
  • RobbSalzmann's avatar
    10 months ago

    Try something like this:

    Dim dimensionName As String = "All Accounts"
    Dim memberFilter As String = "A#Income_Statement.Descendants.Where(Text8 <> 'ICElim')"		
    Dim accountInfos As List(Of MemberInfo) = brapi.Finance.Members.GetMembersUsingFilter(si, BRApi.Finance.Dim.GetDimPk(si, dimensionName), memberFilter, True)
    Dim accountNames As List(Of String) = accountInfos.Select(Function(account) account.Member.Name).ToList()