AnsweredAssumed Answered

Dynamically creating Element Attributes from Template Table Lookup DRs

Question asked by kdoyle01 on Jun 23, 2015
Latest reply on Jul 1, 2015 by kdoyle01

I am creating an AF structure for electrical Substations and their corresponding Feeders.  Ultimately, I need to be able to reference PI Tags associated with the Feeders.  Each Substation has one or more Feeders.

 

In the Element Template I am using for Substations, I would like to reference the Feeders' names as Attributes of the Substation Elements.  But, because the quantity of Feeders varies from one Substation to the next, I'm not sure how to do so.  Does AF provide a mechanism within Templates for referencing/cycling through multiple values (that are returned from Lookup Table DRs) and creating an Attribute for each value using a 'For Each' like process?  I.E., as a varying number of child Attributes (Feeder Names) under a 'Feeders'  parent Attribute (similar to 'Objects' in a 'Collection' relationship).

 

I am already using Table Lookup DRs to populate the Substation Elements' Attributes for static (pre-known) quantities of meta-data and PI tag names.  I'd like to simlarly use Lookup Table DRs to dynamically create the attributes for each sub's (1 or more) Feeder Names and their associated set of PI tags.

 

Use of the PIPoint Array DR may somehow be applicable here.  But, I am unaware of how to dynamically create the child attributes from wihtin a Template.

 

Is this possible?

 

Here's a rough hierarchical layout example of the structure to which I am refering:

 

SUBSTATION A

     FEEDER 1

          PI TagName i

          PI TagName ii

          PI TagName iii

     FEEDER 2

          PI TagName i

          PI TagName ii

          PI TagName iii

 

SUBSTATION B

     FEEDER 1

          PI TagName i

          PI TagName ii

          PI TagName iii

 

SUBSTATION C

     FEEDER 1

          PI TagName i

          PI TagName ii

          PI TagName iii

     FEEDER 2

          PI TagName i

          PI TagName ii

          PI TagName iii

     FEEDER 3

          PI TagName i

          PI TagName ii

          PI TagName iii

Outcomes