10 Replies Latest reply on May 9, 2018 11:32 PM by viveks

    Get the tag name from af attribute

    Dava

      Hi all,

      I want to know if is possible to get the Tag name configured in another attribute and stored in a new attribute.

      Example, I want to get the tag name form the attribute PIPoint and save it in the attribute1

       

      Is there a function or substitution parameter to get it.

      The idea is to get the Tag name not the actual value:

      Does anyone knows if this is possible?

        • Re: Get the tag name from af attribute
          sraposo

          Hi David,

           

          I don't think this is possible, but I'm still looking into it. This is an interesting question. Typically the PI Point name is first stored in an attribute as a value and then with substitution parameters the attribute configuration string refers to this attribute value. Your question, unless I'm mistaken, is the opposite of this.

           

          What is the end goal of doing this ? I'm just trying to understand as there might be another way to achieve the same goal.

           

          Thanks,

          Seb

            • Re: Get the tag name from af attribute
              Dava

              Hi Sebastien

              What I need is to create a way to have the same PI Tag in different elements, let me give you an example:

              The "Actual" Element have a attribute call PIPoint, what I need is the the father element ("MassFlow")
              have the same PI tag in another attribute (in the "Actual" attribute).
              The idea behind this is to obtain a summary of all the PI tags under the "MassFlow" element (that is, all "MassFlow" children)

               

              And the most important thing is generated this summary automatically.

              Meaning when you configured the PI Point attribute in the "Actual" element,

              automatically in the actual attribute in the MassFlow Element (The father of the "Actual" element) will be configure with same PI Tag .

               

               

              In short words, the idea is to avoid copy and paste the Configuration string to other attributes to other elements.

               

               

               

              Hope my example was clear to give an idea of what I'm trying to do

               

              Regards

            • Re: Get the tag name from af attribute
              Rick Davin

              Hi David,

               

              Many people do the opposite of what you want.  They will have a static child attribute named "Tagname" under the attribute named "PIPoint", and they use the value in Tagname to connect to PIPoint.

               

              There is no built-in functionality for what you are asking.  If you know coding, you can make a very simple custom data reference to do what you want.

              2 of 2 people found this helpful
              • Re: Get the tag name from af attribute
                viveks

                We used the Analysis Expression : TagName('<AttributeName>'). Not elegant but works. Analysis1.PNGAnalysis2.PNG