RunQueryFromFile() method
- Last UpdatedJul 19, 2024
- 1 minute read
Execute the query or filter by name defined in a file. This does not impact the current list of queries and filters. If ApplyAsFilter option is true, then execute the query as filter only. Note the following behaviors:
-
If ApplyAsFilter is true, the parameter QueryName needs to be a valid Filter.
-
If ApplyAsFilter is false, the parameter QueryName needs to be a valid Query.
-
In all other scenarios, the RunQuery() will not execute.
Syntax
AlarmClient.RunQueryFromFile(FilePath, QueryName, ApplyAsFilter);
Parameters
FilePath
The file path to the query filter favorites file to execute.
QueryName
The name of the query or filter defined in the user provided file.
ApplyAsFilter
Specify True to execute a query as a filter using the filter criteria and retain the existing alarm subscription.
Example
AlarmClient.RunQueryFromFile("C:\UserQueryFilter.xml", "User High Alarms", true);