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

exporting multiple grid data using single export widget

SOLVED
Highlighted

exporting multiple grid data using single export widget

Hi,

Is it possible to bind service of multiple grids to a single export widget in a single mashup?

 

Thanks,

Shalini V.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: exporting multiple grid data using single export widget

Hello Shalini,

 

I suppose it might depend on the export format you're looking for. One way is to use a service which returns an infotable of infotables. The dataExport widget can receive an infotable of infotables from that service and it will export that in a JSON format. Please see the attached ZIP file for an example using a mashup called footwearMash. The service which returns an infotable of infotables is Things["footwearHelper"].runExports, it is included in the ZIP file and also below is a code listing.

 

Best regards, Tanveer.

 

++++++++++++++++++++++++++++++++++++++

var salesByRegion = Things["salesByRegion"].GetDataTableEntries({
maxItems: undefined /* NUMBER */
});

var storeDetails = Things["storeDetails"].GetDataTableEntries({
maxItems: undefined /* NUMBER */
});

var params = {
infoTableName : "InfoTable",
dataShapeName : "infotableOfInfotablesDS"
};

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

// infotableOfInfotablesDS entry object
var newEntry = new Object();
newEntry.data = salesByRegion; // INFOTABLE
result.AddRow(newEntry);
newEntry.data = storeDetails; // INFOTABLE
result.AddRow(newEntry);

 

View solution in original post

2 REPLIES 2

Re: exporting multiple grid data using single export widget

Hello Shalini,

 

I suppose it might depend on the export format you're looking for. One way is to use a service which returns an infotable of infotables. The dataExport widget can receive an infotable of infotables from that service and it will export that in a JSON format. Please see the attached ZIP file for an example using a mashup called footwearMash. The service which returns an infotable of infotables is Things["footwearHelper"].runExports, it is included in the ZIP file and also below is a code listing.

 

Best regards, Tanveer.

 

++++++++++++++++++++++++++++++++++++++

var salesByRegion = Things["salesByRegion"].GetDataTableEntries({
maxItems: undefined /* NUMBER */
});

var storeDetails = Things["storeDetails"].GetDataTableEntries({
maxItems: undefined /* NUMBER */
});

var params = {
infoTableName : "InfoTable",
dataShapeName : "infotableOfInfotablesDS"
};

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

// infotableOfInfotablesDS entry object
var newEntry = new Object();
newEntry.data = salesByRegion; // INFOTABLE
result.AddRow(newEntry);
newEntry.data = storeDetails; // INFOTABLE
result.AddRow(newEntry);

 

View solution in original post

Re: exporting multiple grid data using single export widget

Hi @svisveswaraiya-.

 

If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________