Loading TOC...

alert.ruleSetDescription

alert.ruleSetDescription(
   rule as Object,
   description as String
) as Object

Summary

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

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

Example

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

  alert.ruleSetDescription(
    alert.getAllRules("http://acme.com/alert/message-board", cts.wordQuery("dna"))[0],
    "Email when new article about DNA")

  => Returns the JSON representation of the rule with the description 
     updated to "Email when new article about DNA"
  

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