Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi,
Is it possible to bind service of multiple grids to a single export widget in a single mashup?
Thanks,
Shalini V.
Solved! Go to Solution.
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);
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);
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