How do I send parameters to Query and Compare Query?

Designing Queries With Parameters

Query parameters are added to queries on the format: {@parametername[default:value][datatype:value][preview:value][format:value]}.

The default value is used when no parameter is used when executing task through exMon’s Execution Agent.

Defining a datatype value makes exMon Portal provide accurate dialog for parameters, making executing from exMon Portal more comfortable.

The preview value is only used when testing the query in exMon Administrator.

The format value can only be used in combination with the datatypes date or datetime. exMon Portal uses the format to both display the parameter as well as execute using it.

You can add multiple parameters and reuse the same parameter.
In the example below we select products by color and price range and when testing it in exMon Administrator we select black products that cost between 0 and 200.


Running Queries With Parameters

Queries that define parameters can be executed with or without parameters in the command line.

If you want your value to be the same for most of your executions, you can define a default value. That way, if you chose to not execute task with parameters the default will be used.

Examples to execute the query above:

  • epcmd –query 1 –@color “Orange” –@pricefrom 10 –@priceto 190
  • epcmd –query 1 –@pricefrom 10
  • epcmd –query 1 –@color “Blue”
  • epcmd –query 1

Adding To Object Groups

You can add the same query multiple times into object group to run with different parameters.
Note that object groups with duplicate queries can not be added to Process Maps on exMon Portal.

exMon Contact Us