Api.Pov.Entity.MemberId

Api.Pov.Entity.MemberId is obtained from the Entity Member Id for the current Entity POV being executed during the calculation. The Entity.MemberId is stored as a unique integer to represent a single Entity member. The Entity Member Id is also found using the Grid View in the Entity Dimension Library.

Api.Pov.Entity.MemberId is used as a property in many functions.  Here are some of the most common functions:

  • Get Local Currency Id for current Entity POV.

    • Example: api.Entity.GetLocalCurrencyId(api.Pov.Entity.MemberId)

  • Get Local Currency Cons Member Name for current Entity POV.

    • Example:

      api.Entity.GetLocalCurrencyConsMember(api.Pov.Entity.MemberId).Name

  • Get value in Text Field for Dimension Members prior to executing formula calculation.

    • Example: api.Entity.Text(api.Pov.Entity.MemberId, 1)

  • Get Percent Consolidation for Parent Child Relationship and specific to user localization. Can also determine by Scenario Type and Time.

    • Example: api.Entity.PercentConsolidation(api.Pov.Entity.MemberId, api.Pov.Parent.MemberId, api.Pov.ScenarioTypeId, api.Pov.Time.MemberId).XFToStringForFormula

  • Get Percent Ownership for Parent Child Relationship and specific to user localization. Can also determine by Scenario Type and Time.

    • Example: api.Entity.PercentOwnership(api.Pov.Entity.MemberId, api.Pov.Parent.MemberId, api.Pov.ScenarioTypeId, api.Pov.Time.MemberId).XFToStringForFormula

Api.Pov.Entity.MemberId Usage

Example using api.Pov.Entity.MemberId:

Copy
Dim entityId As Integer = api.Pov.Entity.MemberId
BRApi.ErrorLog.LogMessage(si, "EntityId = " & entityId)

ErrorLog Result:

Example using api.Pov.Entity.MemberId in a working formula:

Copy
'Get Text Value in Entity Text 1 Field for Current Entity POV
Dim entityText As String = api.Entity.Text(api.Pov.Entity.MemberId, 1)

'Only Run For Base Entities And at Local Currency
If (Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyforEntity()) Then
    'Execute Formula if Entity has NA in the Entity Text 1 Field
    If entityText.XFEqualsIgnoreCase("NA") Then
        api.Data.Calculate("A#CashCalc = A#10000")
    End If
End If