Does LABKEY.ext.Store work with LabKey's parameterized queries?

LabKey Support Forum (Inactive)
Does LABKEY.ext.Store work with LabKey's parameterized queries? Jon (LabKey DevOps)  2017-09-18 23:20
Status: Closed
 
Hi Leo,

I did a basic test using the code example here:

https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.ext.Store.html

And the parameterized queries doc here:

https://www.labkey.org/Documentation/wiki-page.view?name=paramsql

Using the Physical Exam dataset from our demo study, I created the following wiki:

<div id="div1"/>
 <script type="text/javascript">

 // This sample code uses LABKEY.ext.Store to hold data from the server's Users table.
 // Ext.grid.EditorGridPanel provides a user interface for updating the Phone column.
 // On pressing the 'Submit' button, any changes made in the grid are submitted to the server.
 var _store = new LABKEY.ext.Store({
    schemaName: 'study',
    queryName: 'ParameterizedQuery',
    columns: 'ParticipantId,date,Temp_C,Weight_kg',
    parameters: {'MinTemp': '37', 'MinWeight': '100'},
    autoLoad: true
});

 var _grid = new Ext.grid.EditorGridPanel({
    title: 'Param Store Test',
    store: _store,
    renderTo: 'div1',
    autoHeight: true,
    columnLines: true,
    viewConfig: {
        forceFit: true
    },
    colModel: new Ext.grid.ColumnModel({
        columns: [{
            header: 'Participant Id',
            dataIndex: 'ParticipantId',
            hidden: false,
            width: 10
        }, {
            header: 'Date',
            dataIndex: 'date',
            hidden: false,
            sortable: true,
            width: 10,
            editor: new Ext.form.TextField()
        }, {
            header: 'Temperature',
            dataIndex: 'Temp_C',
            hidden: false,
            width: 10
        }, {
            header: 'Weight',
            dataIndex: 'Weight_kg',
            hidden: false,
            width: 10
        }]
    })
});

 </script>

Now, although I didn't get the error like you did, I did notice that the parameters were not showing up in the POST to the query-selectRows.view endpoint when running the Google JConsole debugger.

I'll get a bug written up on this to get this investigated further.

Regards,

Jon