custom function when rule triggers

Home Forums General discussion custom function when rule triggers

Viewing 1 reply thread
  • Author
    Posts
    • #12669
      Navya Marla
      Participant

        Hi Alex,

        How can i call javascript function with parameters when rules triggers?

        Please find the attached screen shot.

        Thanks,
        Navya

      • #12678
        Alexander Bautz
        Keymaster

          Hi,
          Currently you cannot pass any arguments directly, but when calling this function the “rule friendly name” is passed as an argument. This means you can name your rule “PAT” and then get the argument passed if you set up the function like this:

          function fnpattest(ruleId){
              alert(ruleId);
          }

          You can also set it up like this if it is more convenient:

          In your rule – call this function

          fnpattestPAT

          Then in the Custom JS insert this function

          function fnpattestPAT(){
              fnpattest("PAT");
          }

          Hope this helps,
          Alexander

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.