Skip to main content
Member
Dec 1, 2025 2:57 PM UTC
Solved

Dynamic calc

Dynamic calc formula for an account

Dim RATE As DataCell = api.Data.GetDataCell("A#RATE:F#99:U7#Top")
Dim CALC As DataCell = api.Data.GetDataCell("A#CALC:F#F99:U7#Top")
 
If api.Pov.Entity.Name <> "None" And api.Entity.HasChildren() Then
If RATE.CellAmount < 0.15
api.Data.Calculate("RATE = 0.15 * RemoveZeros(CALC)")
Return RATE
Else
Return 0
End If
End If
 
i'm calling A#RATE from the cube view.
i have error unable to execute the formula for member RATE, error in processing script.
when i compile the formula no issue
ManjuAnswer
Member
Dec 1, 2025 3:16 PM UTC

fixed the formula - changed the account type  updated the formaula pass .working well!
Dim RATE As DataCell = api.Data.GetDataCell("A#RATE:F#F99:U7#Top")

If api.Pov.Entity.Name <> "None" And api.Entity.HasChildren() Then
If P2_TOP_UP_TAX_RATE.CellAmount < 0.15
        Api.Data.Calculate("A#RATE:F#F99:U7#Top = 0.15 * A#CALC:F#F99:U7#Top")
    End If
End If

 

1 reply

ManjuAuthorAnswer
Member
Dec 1, 2025 3:16 PM UTC

fixed the formula - changed the account type  updated the formaula pass .working well!
Dim RATE As DataCell = api.Data.GetDataCell("A#RATE:F#F99:U7#Top")

If api.Pov.Entity.Name <> "None" And api.Entity.HasChildren() Then
If P2_TOP_UP_TAX_RATE.CellAmount < 0.15
        Api.Data.Calculate("A#RATE:F#F99:U7#Top = 0.15 * A#CALC:F#F99:U7#Top")
    End If
End If