04-11-2023 12:17 PM - last edited on 05-23-2023 05:05 AM by JackLacava
Hi Team,
Could you please let us know if it's possible to use the function math.pow in a databuffer? and if yes, which is the correct syntax?
As for example Dim resultDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("Math.Pow(($sourceBufferMonthlyRate),$sourceDataBufferResidual)")
or maybe in a api.Data.Calculate function?
Thank you in advance!
Giorgia
04-11-2023 07:25 PM - edited 04-11-2023 07:27 PM
You cannot use math.pow like that, try with the ^ operator, but if i remember correctly in Calculate formulas (and hence in GetDataBufferUsingFormula, which is effectively a subset of that) you're limited to the 4 main operators ( + - * / ).
A workaround is to go cell by cell and use math.pow on the .CellAmount property, but you'll have to add "Imports System.Math" at the top - so it will have to be done in a Business Rule.
04-12-2023 03:49 AM - edited 04-12-2023 06:14 AM
Thank you for your reply!
Yes a workaround would be a for cycle but maybe there is a more efficient and rapid solution for evaluate two databuffer (and other math function).