Loading TOC...

MarkLogic Server 11.0 Product Documentation
alert:rule-set-user-id

alert:rule-set-user-id(
   $rule as element(alert:rule),
   $user-id as xs:unsignedLong
) as element(alert:rule)*

Summary

This function returns the rule with the user ID updated. If the caller does not have the alert-config privilege, an exception will be thrown if the caller attempts to save a rule for a user other than himself.

Parameters
$rule The representation of a rule.
user-id The user ID value to set for the given rule.

Example

  xquery version "1.0-ml";
  import module namespace alert = "http://marklogic.com/xdmp/alert" 
		  at "/MarkLogic/alert.xqy";

  alert:rule-set-user-id($rule, 123456789)

  => Returns the XML representation of the rule with the
     new user ID updated to 123456789
  

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