Forum Discussion
jbrem
New Contributor III
Hi FredLucas thx for the response. This helped me get things extremely close! Once I got data, I realized I need to have a value in No LOB for any entity that does not have revenue. I'm attempting this with the statement in bold below but I can't get it to validate. Any more wisdom for me? Thx!
If Not api.Entity.HasChildren And api.Cons.IsLocalCurrencyForEntity Then
api.data.Calculate("A#LOB_Pct_BURev:U1#None:U6#Local:U7#RLE_LOB:U8#None = DivideUnbalanced(A#BU_REV:U1#Top:U7#Top,A#BU_Rev:U1#Top:U7#Top:U2#Top, U2#Top)")
Dim valueCheck As Double
valueCheck = api.Data.Calculate("A#LOB_Pct_Rev:u1#Top:U2#LOB")
If valueCheck<> 1 Then
Api.Data.Calculate("A#LOB_Pct_BURev:U1#None:U2#No_LOB:U6#Local:U7#RLE_LOB:U8#None = 1")
End If
End If
FredLucas
14 hours agoContributor III
I believe the problem is here:
valueCheck = api.Data.Calculate("A#LOB_Pct_Rev:u1#Top:U2#LOB")
Api.data.Calculate is a sub i.e.: does not return any value.
You'll probably want to use the api.Data.GetDataCell instead:
valueCheck = api.Data.GetDataCell("A#LOB_Pct_Rev:u1#Top:U2#LOB .... ").CellAmount
Note: Make sure to specify the full POV
Related Content
- 6 months ago
- 7 months ago
- 6 months ago
- 2 years ago
- 7 months ago