
trgr.propertyContent( property-name as xs.QName ) as element(trgr.propertyContent)
Returns the XML representation of a property part to a triggering event,
usable as the content parameter of a trigger
event constructor such as
trgr.triggerDataEvent
.
| Parameters | |
|---|---|
| property-name | The QName of the property. |
Adding, changing or removing the $property-name document property matches this event part.
const trgr = require('/MarkLogic/triggers');
trgr.triggerDataEvent(
trgr.directoryScope('/myDir/', '1'),
trgr.propertyContent(
fn.QName(null, 'myInterestingProperty')),
trgr.postCommit());
// A property modification trigger event that can
// be used to create a trigger which fires whenever
// the property myInterestingProperty is added, modified
// or removed from a document in /myDir/.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.