Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 3.6 KB

eventtrigger-valuequeries.md

File metadata and controls

92 lines (63 loc) · 3.6 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
EventTrigger.ValueQueries property
For scripting, gets or sets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML that is returned from the subscription query specified in the Subscription property.
9ff92b66-f63c-4736-b086-df7dd8cd2b10
ValueQueries property Task Scheduler
ValueQueries property Task Scheduler , EventTrigger object
EventTrigger object Task Scheduler , ValueQueries property
apiref
EventTrigger.ValueQueries
taskschd.dll
COM
reference
05/31/2018

EventTrigger.ValueQueries property

For scripting, gets or sets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML that is returned from the subscription query specified in the Subscription property.

Syntax

EventTrigger.ValueQueries As String

Property value

A collection of of name-value pairs. Each name-value pair in the collection defines a unique name for a property value of the event that triggers the event trigger. The property value of the event is defined as an XPath event query. For more information about XPath event queries, see Event Selection.

Remarks

The name of the query can be used as a variable in the following action properties:

The following code example strings show two name value pairs that can be used in a name-value collection. The values returned by the XPath queries can replace variables in an action's property. The values are referenced by name, with $(user) and $(machine), in the action property. For example, if the $(user) and $(machine) variables are used in the ShowMessageAction.MessageBody string, then the value of the XPath queries will replace the variables in the string.

name: user
value: Event/UserData/SubjectUserName

name: machine
value: Event/UserData/MachineName

For more information about writing a query string for certain events, see Event Selection and Subscribing to Events.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

Task Scheduler

EventTrigger