Forum Discussion

BabuJayaraman's avatar
BabuJayaraman
New Contributor II
11 months ago

Member formula - Account Type

I have an issue with the member formula with the below condition. It checks for Account Type Revenue or Expense. However if the Account Type is Revenue or Expense, still the condition is not met. Is ...
  • EricOsmanski's avatar
    EricOsmanski
    11 months ago

    Alternatively, you could use this below:

    If api.Account.GetAccountType(api.Pov.Account.MemberId) = AccountType.Revenue OrElse api.Account.GetAccountType(api.Pov.Account.MemberId) = AccountType.Expense Then

  • RobbSalzmann's avatar
    11 months ago

    Hi BabuJayaraman , 
    You are close. Try this:

    Dim acctTypePov As AccountType = api.Account.GetAccountType(api.pov.account.memberid)
    Dim isIncStmtAcct As Boolean = 
    	acctTypePov.Equals(AccountType.Expense) OrElse
    	acctTypePov.Equals(AccountType.Revenue)
    
    If isIncStmtAcct Then
    	Return 1
    End If