cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

exporting only the filtered data

svisveswaraiya
17-Peridot

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.

1 ACCEPTED SOLUTION

Accepted Solutions

If you just want to export the data shown on the Grid, then you can:

1. enable the isEditable in Grid

2. Bind the EditedTable property from Grid to an DataExport widget

View solution in original post

3 REPLIES 3

If you just want to export the data shown on the Grid, then you can:

1. enable the isEditable in Grid

2. Bind the EditedTable property from Grid to an DataExport widget

I believe this works even without using the EditedTable, if the filtering is done server-side.

So just binding the service result to a DataExport widget will work just fine.

Hi @svisveswaraiya.

 

If one of the previous responses answered your question, please mark the appropriate one with the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags