AddParamValue
Description
Assigns one or more values to a parameter.
The parameter number is a Long whose value is between 1 and the total number of parameters. The value argument specifies the new value to add for the parameter.
A parameter may have multiple values. Use this method for each value to add. The interpretation of multiple values is controlled by the ComparisionOperator built into the query. For example, for multiple param values you make multiple calls to this method. The first argument (param_number) is incremented from 1-N and the method is called N times for N param values.
Note: This
method is for DevOps Plan queries
and not for SQL queries. You can use the QueryDef IsSQLGenerated (GetIsSQLGenerated for
Perl) method to determine whether the SQL is generated and thus uses
the parameters, or is a SQL query that was set using the QueryDef SQL method
(SetSQL for Perl) or the Session BuildSQLQuery method.
Syntax
Perl
$resultset->AddParamValue(param_number, value);
- Identifier
- Description
- resultset
- A ResultSet object, representing the rows and columns of data resulting from a query.
- param_number
- A Long identifying the parameter.
- value
- A String containing the value for the parameter.
- Return value
- None.
Example
Perl
' for a query with a dynamic filter on the "state" field with two states:
$resultset->AddParamValue(1, "Submitted");
$resultset->AddParamValue(2, "Resolved");