Loading TOC...

alert.ruleSetName

alert.ruleSetName(
   rule as Object,
   name as String
) as Object

Summary

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

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

Example

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

  alert.ruleSetName( 
        alert.getAllRules("http://acme.com/alert/message-board", cts.wordQuery("dna"))[0], 
         "nucleic acids email")

  => Returns the JSON representation of the rule with the name updated
     to "nucleic acids email"
  

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