URL Query String trigger

Home Forums Classic DFFS URL Query String trigger

Viewing 1 reply thread
  • Author
    Posts
    • #20435
      DCH
      Participant

        Hey there,

        I am able to trigger a rule based on the URL query string no problem. I would like the rule reversed when the query string key doesn’t exist, instead of based on the value. Is that possible?

        Thanks!

      • #20437
        Alexander Bautz
        Keymaster

          Hi,
          To do that you must use some custom js. If you use the latest version of DFFS you can trigger a rule “in reverse” from custom js, if not you must create a new rule that has the trigger set to “No trigger, must be triggered manually” and then call this rule like this form custom js:

          var myUrlKey = GetUrlKeyValue("TheUrlKey");
          if(myUrlKey === ""){
              // Not found - trigger the rule "in reverse" if you have the latest version of DFFS
              spjs.dffs.triggerRule(["~IndexOrFriendlyNameOfRule"]);
              // Or trigger another rule
              spjs.dffs.triggerRule(["IndexOrFriendlyNameOfTheReversedRule"]);
          }
      Viewing 1 reply thread
      • You must be logged in to reply to this topic.