DX NetOps

 View Only
  • 1.  How do I create an event procedure which conditionally changes the value of a specific variable within an event

    Posted Apr 11, 2016 05:05 AM

    Hi everyone,

     

    I was hoping someone could help me out with an event procedure which I haven't encountered before, mostly due to it being conditional and probably using the If function.

     

    I have event 0xfff00001 which creates an event 0xfff00002. Event 0xfff00002 must check if variable 40 equals "N/A" (both are strings), and if so then assigns variable 50 to variable 40. This is to ensure that if variable 40 is N/A that it will be populated by a different variable.

     

    Pseudo code:

     

    If {v 40} equals "N/A"

    Then {v 40} = ToString({v 50})

    Else Nothing

     

    Any ideas?



  • 2.  Re: How do I create an event procedure which conditionally changes the value of a specific variable within an event
    Best Answer

    Posted Apr 11, 2016 09:14 AM

    maybe this example will help you

     

    0xfff00001 E 20 R Aprisma.EventCondition, \

          "regexp( {v 40}, {S \"N/A\"} )", "0xfff00002 1:1, 2:2, 3:3, 4:4, 30-39:30-39, 50:40, 60:60",\

          "default", "0xfff00002 -:-"

     

     

     

    (try "N\/A" if the condition doesn't match)

     

    Regards,
    Olaf



  • 3.  Re: How do I create an event procedure which conditionally changes the value of a specific variable within an event

    Posted Apr 11, 2016 09:31 AM

    Hi Olaf,

     

    Thanks for taking the time to write the code. Your code copies a single variable to {v 40} but not the rest of the variables from 0xfff00001, right? I'm looking to take an event with several variables and change a single one. If I'm mistaken then I'll be happy to try it out in the lab.



  • 4.  Re: How do I create an event procedure which conditionally changes the value of a specific variable within an event

    Posted Apr 11, 2016 09:36 AM

    jsut modified the event rule



  • 5.  Re: How do I create an event procedure which conditionally changes the value of a specific variable within an event

    Posted Apr 11, 2016 09:45 AM

    I'll give it a try   Is there a difference between CA.EventCondition  and Aprisma.EventCondition? I'm using 9.4.2.1