7 Replies Latest reply on Mar 15, 2019 2:43 PM by Emmanuelle

    Syntax in event frame templates




      I would like to get the value of an attribute "Lot" in my templates event.

      It will be use in the naming pattern (%@Lot%).


      I created the attribute in my element as a String Builder.


      Then, when I want to link the attribute of my event frame template it doesn't work.


      Can you help me with the syntax...??



      Gives error:

      The referenced Attribute '.\Elements[.]|Lot' for attribute 'ChargementHuile 2019-03-13 11:12:01.068|Lot' is not configured as a PI Point DataReference.


      %@ .\Elements[.]|Attribute %

      Gives error:

      Cannot retrieve the referenced Attribute '%@.\Elements[.]|Attribute%' for attribute 'HM5204-270219-1|Lot'.



        • Re: Syntax in event frame templates

          Hi Emmanuelle


          I have created an attribute in EF template  (attribute reference : Table Lookup)


          Event Frame Attribute : StringBuilder -->  Elements[.]|Table Lookup


          Event Frame :  Search


          • Re: Syntax in event frame templates
            Eugene Lee

            The crux here is that Lal configured his EF attribute as a StringBuilder DR while your one is a PI Point DR (i guess).

              • Re: Syntax in event frame templates

                Hi Eugene


                I have replicated the issue that Emmanuelle is facing with different attributes data references. Issue is related to element template attribute data reference mapping and event frame template mapping.


                Element Level :  ElementstringBuilder is mapped to sinusoid (PI Point)



                Event frame Template :


                1) String Builder :ElementstringBuilder

                2) PI Point : EventFramePIPointReference


                Event Frame ouput:



                Fix :  Mapped to PI point than stringbuilder


                2 of 2 people found this helpful
                  • Re: Syntax in event frame templates

                    Thank you!!

                    It's working!


                    Just to make sure I understand:


                    The attribute of the event frame template must have the same Data Reference of the Element Attribute?


                    I tried the same technique with an element attribute that is a formula and it doesn't work...?

                    * I cannot wirte Elements[.]|Temperature in the settings of an attribute that as a data reference=Formula.

                    * If I put data reference to <none> the attribute swich to PI Point by it self.


                    Is it possible to reference a formula?

                      • Re: Syntax in event frame templates

                        Hi Emmanuelle


                        To make it work you need to configure as string builder or reference PI Point


                        Option 1 :



                        Event frame Template :


                        Output :


                        Option 2:


                        Event frame template :




                        1 of 1 people found this helpful
                        • Re: Syntax in event frame templates
                          Rick Davin

                          Hello Emmanuelle,


                          No, the attribute on the event frame does not need to have the same data reference as the element attribute.  Lal has given you some good info.  Let me touch on some general notes:


                          • If the element attribute is a PIPoint, then you really should use a PIPoint for the event frame attribute, and use relative point referencing as demonstrated by Lal.


                          • If the element attribute is not a PIPoint, then you should use String Builder DR for the event frame attribute.  Note a quirk of String Builder is any change to the expression causes the EF attribute's data type to switch to String.  The caution here is anytime you perform edits, always make sure the last thing you check/change is the EF attribute data type.


                          • The String Builder DR on an event frame has a well-known limitation where it can only return the value at the event frame's EndTime.


                          • The PI Point DR has greater flexibility in that you may return a value at the event frame StartTime, or perform other aggregations such as Average or Maximum.  This is why the first bullet item here states you want to use PIPoint where possible.
                          3 of 3 people found this helpful
                    • Re: Syntax in event frame templates


                      Very helpful.


                      There so much documentation out there, but those type of explanations make all the difference to make things work smoothly.


                      Thank you guys!