URL Query String trigger

Forums Dynamic Forms for SharePoint URL Query String trigger

This topic contains 1 reply, has 2 voices, and was last updated by  Alexander Bautz 8 months, 3 weeks ago.

  • 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"]);
    }

You must be logged in to reply to this topic.