Skip to main content
July 17, 2025
Solved

What is Api.Cons.IsCurrency?

  • July 17, 2025
  • 1 reply
  • 0 views

I came across this piece of code today:

If (((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity())) And api.Cons.IsCurrency())

I'm guessing the last statement is to be sure that your Cons dimension POV is not on a "non-currency" member such as Elimination.  Have I guessed correctly?  And if so, then wouldn't this already be accounted for in the api.Cons.IsLocalCurrencyForEntity condition?

If I haven't guessed correctly, then my question is what does this condition check for?

 

Best answer by RobbSalzmann

Yes, Api.Cons.IsCurrency checks to see if the supplied ID is a currency.
I agree with your analysis "wouldn't this already be accounted for in the api.Cons.IsLocalCurrencyForEntity condition"

I think you can get the same result with:
If Not api.Entity.HasChildren() AndAlso api.Cons.IsLocalCurrencyForEntity() Then ...

1 reply

July 18, 2025

Yes, Api.Cons.IsCurrency checks to see if the supplied ID is a currency.
I agree with your analysis "wouldn't this already be accounted for in the api.Cons.IsLocalCurrencyForEntity condition"

I think you can get the same result with:
If Not api.Entity.HasChildren() AndAlso api.Cons.IsLocalCurrencyForEntity() Then ...