exporting only the filtered data
Hi,
I wanted to export the data that I have binded to grid. But, I am filtering the grid data by passing input. Based on the input, the grid data will be filtered. So, If I filter by order number only those filtered data needs to be exported. How can I achieve this?
I am mentioning the service that I am binding to grid.
switch(String(input))
{
case "All":
var params = {
From: From /* DATETIME */,
To: To /* DATETIME */
};
// result: INFOTABLE dataShape: "Navistar_RejectedOrder_DS"
sampleResult = me.Get_RejectedOrderAll(params);
break;
//
case "Part Number":
var params = {
From: From /* DATETIME */,
To: To /* DATETIME */,
partNumber: partNumber /* STRING */
};
// result: INFOTABLE dataShape: "Navistar_RejectedOrder_DS"
sampleResult = me.Get_RejectedOrder_partNumber(params);
break;
//
case "Job Number":
var params = {
From: From /* DATETIME */,
To: To /* DATETIME */,
jobNum: jobNumber /* STRING */
};
// result: INFOTABLE dataShape: "Navistar_RejectedOrder_DS"
sampleResult = me.Get_RejectedOrder_JobNumber(params);
break;
case "Line Set":
var params = {
From: From /* DATETIME */,
To: To /* DATETIME */,
lineSet: lineSetNumber /* STRING */
};
// result: INFOTABLE dataShape: "Navistar_RejectedOrder_DS"
sampleResult = me.Get_RejectedOrder_lineSet(params);
break;
}
if (input == null || input == "")
{
var params = {
From: From /* DATETIME */,
To: To /* DATETIME */
};
// result: INFOTABLE dataShape: "Navistar_RejectedOrder_DS"
sampleResult = me.Get_RejectedOrderAll(params);
}
if (From == null || From == "" || To == null || To == "")
{
// result: INFOTABLE dataShape: "Navistar_RejectedOrder_DS"
sampleResult = me.Get_RejectedOrderNoFilter();
}
var result1 = sampleResult;
var params2 = {
t: result1/* INFOTABLE */,
query: query /* QUERY */
};
// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Query(params2);
Thanks,
Shalini V.

