Kashinath
2 years agoNew Contributor II
After Sign Flipping ,Data Getting Cleared When Running consolidation
Guys, There is a requirement to reverse the signage of all Revenue Accounts, So we have a Code that gets all The Revenue Accounts and Multiplied it with ' -1' , And the data is getting Flipped . But when we try to Consolidate that flipped Data , It is getting Cleared . Also When We try to run The rule 2 or 3 times , then also the Data is Getting Cleared. Any idea why this is happening.
This is the code that does the flipping :
Dim accountDimName As String = "Financial_Statements"
Dim mFilter As String = "A#[4.00.000.000].Base"
Dim lstAccounts As List(Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, accountDimName, mFilter, False)
'filter on revenue accounts
Dim lstRevenueAccounts As List(Of MemberInfo) = lstAccounts.Where(Function(x) BRApi.Finance.Account.GetAccountType(si, x.Member.MemberId).Equals(AccountType.Revenue)).ToList()
For Each MemberInfo As MemberInfo In lstRevenueAccounts
Dim nMemberId As Integer = BRApi.Finance.Members.GetMemberId(si, Dimtype.Account.Id,
MemberInfo.Member.Name)
Dim sValue As String = api.Members.GetMemberName( Dimtype.Account.Id, nMemberId)
api.Data.Calculate("A#"& sValue &"=A#"& sValue &" * -1")
Next
Thanks a lot .