02-08-2022
02:34 PM
- last edited on
05-02-2023
10:22 AM
by
JackLacava
Hello Everyone,
Looking for a quick help Please.
Here I am trying to write a Dynamic Calculation code which will follow the exact logic of PVA translation however will use rates from previous year.
So kind of a Constant currency solution.
However when I am in Time period 2, I am unable to pull data from different periods, This calculation works If I make my T#Hardcoded e.g. 2020M1/2020M2.
Current outcome is all zeros 😞
Please help with any solution anyone has or can point me to right direction - since unable to understand what is missing.
Thanks
Satish
Solved! Go to Solution.
02-10-2022 06:11 AM
You can use databuffers to help you with debugging:
Dim logSource As DataBuffer = api.Data.GetDataBufferUsingFormula("Your Formula's right side")
logSource.LogDataBuffer(api, "The source", 100000)
You will get all valid intersections of the databuffer as a list in the error log.
02-08-2022 04:51 PM
Hi SKMundra: two things to check:
1) Try dropping the ending .CellAmount property from the end of your calculation. Your GetDataCell will contain the math. We have some similar FX related UD8's. Our calc looks like:
Return api.Data.GetDataCell("U8#None:C#Local * " & rateAverage)
2) Validate that your PeriodicRate1 is not 0. You can use the BRApi.ErrorLog.LogMessage(...) for simple debugging. But be mindful that for a UD8 formula it will log a message or every cell it is calculating.
Cheers,
-DB
02-10-2022 06:11 AM
You can use databuffers to help you with debugging:
Dim logSource As DataBuffer = api.Data.GetDataBufferUsingFormula("Your Formula's right side")
logSource.LogDataBuffer(api, "The source", 100000)
You will get all valid intersections of the databuffer as a list in the error log.