Forum Discussion

Krishna's avatar
Krishna
Valued Contributor
18 days ago
Solved

Finance BR. GetDataCell is not working

All,

I have a form populated with data & I am trying to retrieve the data through the Finance BR under calculate. It is not displaying the data in the error log.

Sample Data. I am trying to retrieve the data at Parent Entity with Base ICP intersection.

 BaseICP - 3000
Parent Entity - P10000.2

The below is the code 

If api.Pov.Scenario.Name="Actual" And api.Pov.Cons.Name="Elimination" Then              

Dim Entity As String = api.Pov.Entity.Name              

Dim Parent As String = api.Pov.Parent.Name              

Dim Ownership As Decimal = api.Data.GetDataCell("E#" & Parent & ":C#Local:S#ActualOwnershipCalcs:A#UltimateOwnership:F#None:O#Top:I#" & Entity & ":U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None").CellAmount               api.LogMessage(Ownership) End If

Any Help would be appreciated!!!

Thanks

  • Krishna's avatar
    Krishna
    3 days ago

    Thanks, Victortei. I found the solution. I have to include the cube name, and it is working now.

    api.Data.GetDataCell("cb#CubeName:E#" & Parent & ":I#" & entity & cellPOV).CellAmount

    Thanks

    Krishna

  • victortei's avatar
    victortei
    New Contributor III

    Try using this instead

    brapi.ErrorLog.LogMessage(si, "Message Here")

    In your case, you can write:

    brapi.ErrorLog.LogMessage(si, $"Ownership amount is {Ownership}")

    You should at least see an entry in your Error Log.

    • Krishna's avatar
      Krishna
      Valued Contributor

      Thanks, Victortei. I found the solution. I have to include the cube name, and it is working now.

      api.Data.GetDataCell("cb#CubeName:E#" & Parent & ":I#" & entity & cellPOV).CellAmount

      Thanks

      Krishna