Skip to main content
1-Visitor
December 27, 2019
Solved

exporting only the filtered data

  • December 27, 2019
  • 2 replies
  • 1301 views

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.

Best answer by zyuan1

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

2 replies

zyuan15-Regular MemberAnswer
5-Regular Member
December 27, 2019

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

19-Tanzanite
December 27, 2019

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.

Community Manager
January 10, 2020

Hi @svisveswaraiya_285988.

 

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