Loading TOC...

MarkLogic 9 Product Documentation
alert.ruleSetOptions

alert.ruleSetOptions(
   rule as Object,
   options as Object
) as Object

Summary

This function returns the rule with the options of the rule updated.

Parameters
rule The representation of a rule.
options The options to set for the given rule.

Example

  var alert = require("/MarkLogic/alert.xqy");

  alert.ruleSetOptions(
       alert.getAllRules("http://acme.com/alert/message-board", cts.wordQuery("dna"))[0],
       {"emailAddress": "me@somedomain.com"})

  => Returns the JSON representation of the rule with the options 
     updated to "options": {"emailAddress": "me@somedomain.com"}
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.