My list parameter is called “Params” (“@Params”)
You add rows to the Query Execution DataSet or TableSet, with the
ParameterID of “Params”, and the ParameterValue(s) with your values.
Smart Client:
//Client Code
DynamicQueryAdapter dQ = new DynamicQueryAdapter(UD01Form);
dQ.BOConnect();
QueryExecutionDataSet qeDS = dQ.GetQueryExecutionParametersByID("Kev_t1");
qeDS.ExecutionParameter.Clear();
qeDS.ExecutionParameter.AddExecutionParameterRow("Params", "D" , "nvarchar", false, Guid.Empty,"A");
qeDS.ExecutionParameter.AddExecutionParameterRow("Params", "E" , "nvarchar", false, Guid.Empty,"A");
dQ.ExecuteByID("Kev_t1", qeDS);
string retString = JsonConvert.SerializeObject(dQ.QueryResults.Tables["Results"], Formatting.Indented);
//Clipboard.SetText(retString);
MessageBox.Show(retString);
dQ.Dispose();
//Returns
[
{
"ABCCode_ABCCode": "E",
"RowMod": null,
"RowIdent": "d8bda19f-6caf-459f-9b8e-d1193e104d08",
"SysRowID": "d8bda19f-6caf-459f-9b8e-d1193e104d08"
},
{
"ABCCode_ABCCode": "D",
"RowMod": null,
"RowIdent": "cb73d97e-4617-4e1c-87a9-731a89ec9ea8",
"SysRowID": "cb73d97e-4617-4e1c-87a9-731a89ec9ea8"
}
]
Calling from BPM:
//BPM Code
string retString = "";
QueryExecutionTableset qeTS = dq.GetQueryExecutionParametersByID("Kev_t1");
qeTS.ExecutionParameter.Add(new ExecutionParameterRow {
ParameterID = "Params",
ParameterValue = "D"
});
qeTS.ExecutionParameter.Add(new ExecutionParameterRow {
ParameterID = "Params",
ParameterValue = "E"
});
DataSet retDS = dq.ExecuteByID("Kev_t1", qeTS);
retString += JsonConvert.SerializeObject(retDS, Formatting.Indented);
InfoMessage.Publish(retString);
dq.Dispose();
{
"Results": [
{
"ABCCode_ABCCode": "E",
"RowMod": null,
"RowIdent": "0a009fac-0144-4a7a-ab7e-ad4c1ba2c787",
"SysRowID": "0a009fac-0144-4a7a-ab7e-ad4c1ba2c787"
},
{
"ABCCode_ABCCode": "D",
"RowMod": null,
"RowIdent": "abf8b301-6fe7-46ac-9d86-cc53a13312da",
"SysRowID": "abf8b301-6fe7-46ac-9d86-cc53a13312da"
}
],
"Errors": [],
"ExecutionInfo": [
{
"Name": "ExecutionTime",
"Value": "4.4276"
}
]
}