Loading TOC...

trgr.anyPropertyContent

trgr.anyPropertyContent() as element(trgr.anyPropertyContent)

Summary

Returns the XML representation of an all-properties part to a triggering event, usable as the content parameter of a trigger event constructor such as trgr.triggerDataEvent .

Usage Notes

Adding, changing or removing any document property matches this event part.

Example

const trgr = require('/MarkLogic/triggers');

trgr.triggerDataEvent(
  trgr.directoryScope('/myDir/', '1'),
  trgr.anyPropertyContent(),
  trgr.postCommit());

// A property modification trigger event that can
// be used to create a trigger which fires whenever any
// property is added, changed or removed on a document 
// in the /myDir/ directory.
   

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