Parameterized OQL Grid with the parameter from a Data View

0
Hi. I need to display the result of a parameterized OQL where the parameter is a Data View object. However, the Report Grid widget does not let you choose the parameters for its data set and it does not display any error.It just runs the OQL as if there were no parameters at all. There's the Report Parameter widget that looks like a dropdown, but it's blank by default and there's no way to set it programmatically.
asked
1 answers
0
var aaathissnippet = this;

if (aaathissnippet.contextObj) {

var aaasiblings = dijit.findWidgets(aaathissnippet.domNode.parentNode);
var aaareportparam = aaasiblings.find(djw => djw.isInstanceOf(reporting.widget.ReportParameter) && djw.parameter === "MyParamName");

aaareportparam.mxcontext.setParam(aaareportparam.parameter, aaathissnippet.contextObj.getGuid());


}

I added an HTML Snippet with Context widget and a Report Parameter widget to the same container and put there the above javascript. Now it sets the dropdown value when the context object is set.

 

However, I tried adding some string parameters to the query to implement grid search and found that for whatever reason Mendix does not support string parameters in Data Set.

answered