AnsweredAssumed Answered

Can parent elements affect children?

Question asked by SvenBatalla on Aug 24, 2015
Latest reply on Aug 25, 2015 by SvenBatalla

My clients have an element hierarchy wherein I inject some of my own element using my own template.  I say this because I cannot control their elements.  So let's imagine a hierarchy like this one:

 

Root

|- Node 1

|- Node 2

:  |- Node 3

   :  |- Node 4

      |  |- My Node 1

      |  :

      |- Node 5

      :  |- My Node 2

         :

 

In the hierarchy above, the elements I have injected are "My Node 1" and "My Node 2".  These elements have a calculation within them that yields a true/false.  This calculation must needs be dependent on parent nodes.  The purpose of the calculation in question is to allow/prevent other calculations in my node from continuing.  For context:  imagine a piece of equipment being shutdown.  If that asset is shut off, my calculations would be useless, so they need to be "masked" at that moment.  So here's the scenario:

 

In the event that a particular value is set on "Node 2" or "Node 3", my two elements would both need to have the aforementioned attribute set to "true".  If a particular value is set on "Node 4" but NOT "Node 5", then "My Node 1" would need that attribute set to "true" while "My Node 2" would have that attribute set to "false".

 

To me, this seems like a reverse roll-up.  Rather than rolling information up the tree, I need to inherit it.  I imagine it would be possible for me to mandate to the client that the attributes that I will look at MUST be named a certain way and yield a certain kind of value (e.g. Boolean), but beyond that, I don't know how to achieve this.  The only limitation I have is that this needs to be done using AF templating and NOT via code that I would write via the AFSDK.

 

Thoughts?

Outcomes