Skip to main content
April 14, 2023
Solved

Business Rules

  • April 14, 2023
  • 2 replies
  • 0 views

Hello, I an trying to write a calculation to divide one number by another one and have it to flow into a new account. Below is the formula I am using, but I am not getting the date to calculate. Can someone assist on how to write it correctly. 

 

Calculate("A#mpg test","Divide(A#33010, A#33005)",deptFilter)

Best answer by EricOsmanski

Without knowing what the variable "deptFilter" is, try this:

api.Data.Calculate("A#[mpg test] = Divide(A#33010, A#33005)",deptFilter)

2 replies

April 14, 2023

Without knowing what the variable "deptFilter" is, try this:

api.Data.Calculate("A#[mpg test] = Divide(A#33010, A#33005)",deptFilter)

SS_AdminAuthor
April 18, 2023

Hi Eric,

Unfortunately, neither of them didn't work. Should I write it in Business rules or in member formula? 

February 20, 2024

hi

As Eric mentioned above without knowing the variable  "deptFilter" is, and also assuming that you are trying to write a member formula in Account Dim then try this:

Return api.Data.GetDatacell("Divide((A#33010)",(deptFilter))").CellAmount

You cant state 2 Account like A#33010 & A#33005 and that the reason i have only mentioned one account to be divided by deptFilter.