5 Replies Latest reply on May 1, 2018 4:09 PM by caffreys_col

    Tables in PI-AF - linking to attributes in Notification

    caffreys_col

      I've been asked to create PI notifications to warn of breaches in our quality results. The results have they have upper and lower limits. What I would like to do is generate a notification if any lab result is outside the upper/lower limits and then show this in a notification, but I don't want to have to create individual notifications for each lab results. Hopefully that makes sense.

       

      For example...

      The table below shows 3 lab results. When any of the results are outside the upper or lower limits then it will trigger a generic email. I have no issue with creating individual analysis for each lab result, but thought I could use a table to cross-reference the Result name with the lower and upper limits, and then have a generic notification which picks up the trigger and the associated limits.

      For instance, Result1 has a value of 15. That's outside the upper limit, therefore the Notification will trigger and show the value of Result1, the lower limit and the upper limit in the body of text within the notification.

       

       

      Lab result nameLower LimitUpper Limit
      Result1010
      Result2n/a2.5
      Result35

      n/a

        • Re: Tables in PI-AF - linking to attributes in Notification
          Dan Fishman

          Colin, using a tablelookup to setup the AF Attribute Traits is a great way to go about it.

           

            I agree, using an AF Tablelookup makes sense here so could can scale your results or change the limits from one place. You could reference an attribute called "ResultX" or an element called "ResultX" depending on how you plan to use the results and if other assets have varying number of results.  Using separate AF elements per result definitely allows much flexibility, but might not help end users see the results depending on what they need to know. 

           

          If you want to use just one analysis to do all of this it will be tricky since the states are based on priority.

          1 of 1 people found this helpful
          • Re: Tables in PI-AF - linking to attributes in Notification
            sraposo

            Hi Colin,

             

            I agree with Dan Fishman, using a table lookup seems to be the more intuitive way to go about this. How is the lab data inserted ? Is the string (Lab result name) and the value inserted into the same PI Point? Are they inserted into separate PI Points Or is the Lab result name not inserted at all?

             

            I think we just need a little more details to provide a clearer solution.

             

            Thanks,

            Seb

            • Re: Tables in PI-AF - linking to attributes in Notification
              caffreys_col

              Hi Seb/Dan,

               

              The name of the lab result being tested isn't entered. We have individual PI tags for each test, so I can't pick up a name, and then apply limits based on that name. I've managed to link the limits to which product we are on for some lab results but most lab results are generic so can't be associated with a product name. I did try and create an analysis which set an attribute to a number which would then be read by a table to highlight which lab result was out of spec in another attribute, but with over 30 lab tests the "IF" statement got a bit big (and so did the table).

              For example...

              If "test1" < "limit1" then 1 else (If "test1" > "limit2" then 2 else (If....

               

              I've bitten the bullet and created a set of attributes which are set to the upper and lower limits for each test, and then create analysis to see if the lab result is within these limits.

               

              The one issue I'm finding is that I can't show the triggering expression in the Notification email. There is an option for it (start trigger expression), but it won't show up when I put in test numbers to trigger the email. Odd. Any suggestions?

               

              Thanks

               

              Col