3 Replies Latest reply on Jul 17, 2018 3:10 PM by dcurras

    How to create notification when value changes with previous value

    PowerPI

      I would like

      • To trigger an event notification when the value of an attribute changes
      • The event to end immediately after it starts
      • The notification to contain the current value as well as the previous value (preferably without using tags)

       

      I have been able to create an event when the value changes (HasValueChanged) and send a notification with the current value.

      I have not been able to figure out how to end the event immediately or include the previous different value.

       

      Thanks

        • Re: How to create notification when value changes with previous value
          dcurras

          Hello Drew,

           

          You have different options but the one that may work for you is to include the previous different value on your Notification by using an output expression on your Event frame analysis.

          Note: This Output expression feature only available on version 2017R2 (2.9.5.8352) or later

          Here is an example I reproduced on my system with a similar case as yours:

          In my case I have the event frame analysis triggers when my input attribute 'Status OPC' is not equal to "0 | Good". I define then an output expression associated to an Output attribute "Llama_Output2" that will get the Previous value of the input attribute using PrevVal() function.

           

          You can then configure your Notification format to get the previous value recorded on "Llama_Output2" as well as the current value on the same email as soon as the Event frame analysis is triggered.

           

          I hope this information is useful!

           

          Regards,

           

          Diego

          • Re: How to create notification when value changes with previous value
            dcurras

            Hello Drew,

            Sorry for the delay. If it still helps you, it seems you do not have the last updated version of 2017R2 where this function was introduced. Here is the full name of the install kit you may download from Tech support website:

            - PI AF Services and PI Web API 2017 R2 - Update 1 Install Kit

             

            Also, the newest version of AF/Analysis 2018 has the functionality.

             

            Regards,

            Diego