Forum Discussion

SS_Admin's avatar
SS_Admin
New Contributor
2 years ago

Business Rules

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)

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

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

  • EricOsmanski's avatar
    EricOsmanski
    Valued Contributor

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

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

    • SS_Admin's avatar
      SS_Admin
      New Contributor

      Hi Eric,

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

  • 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.