2 Replies Latest reply on Apr 18, 2014 6:32 PM by kthuang

    AF formula attributes execution sequence


      My question is about the calculation sequence of formula attribues in an element.


      Does the parent attribute's formula calculate after all its child attributes' formula have been calculated?


      Try to build scalable hierarchy of attributes with attribute templates contains formula results which will be used by parent formula.




      KT Huang



        • Re: AF formula attributes execution sequence
          David Hearn

          Data references are executed on demand. So for the Formula data reference configured on an attribute, it provides a list of its input attributes used in the calculation and reads the values in bulk. It will then evaluate the calculation and return the result.


          So if a parent attribute with a formula is referencing a child attribute with a formula, then calling GetValue on the parent attribute will first obtain its inputs which will cause the child attribute's formula to be evaluated. Then the parent's formula will be evaluated. As you can see, this can easily cascade into many inputs being read and evaluated when reading an attribute's value which references many nested attributes with formulas. The new Analytics just released in AF 2.6 is a better solution for this type of configuration.